Questions tagged [luau]

Luau is a scripting language based on Lua 5.1.

The luau language was developed by Roblox. The language's website is at https://luau-lang.org/.

123 questions
0
votes
0 answers

Roblox WidthScale not being affected

I'm trying to make a potion where you get thin when you drink it, but when I try the code below, it doesn't work. No errors, no warnings, no nothing. return function(Player) local HumanoidDescription =…
Cmb
  • 334
  • 2
  • 18
0
votes
1 answer

My script for Roblox wont work. Its supposed to close all other frames when the button is clicked

So it throws no errors. All of the frames are being referenced correctly. I am so confused and do not know how to fix it, I have been searching for examples and cannot find ANYTHING. Even ChatGPT couldnt make a working one. local StarterGui =…
0
votes
0 answers

Code to change the angle not working with string.match

I made a code that uses the Module3D to attach a GUI with a 3D Model in Roblox, i tried to change the angle if the Build name contains "Building" using string.match, but didn't work, and i have no errors in output. How i can fix that? Code: local…
takezo
  • 101
  • 7
0
votes
1 answer

I need help here my script does not work and there is nothing in the output

`script.Parent.ClickDetector.MouseClick:Connect(function(Player) Player:WaitForChild("leaderstats"):WaitForChild("Power").Value -= script.Parent:GetAttribute("Damage") end)` I expected the damage of the model to romove the player's power
0
votes
1 answer

How to destroy parts in order by colour

While scripting a game in ROBLOX I was unable to make a script that removed a part in order by colour. I tried: local partColours = {'Really Red', 'Really Blue', 'Magenta', 'Lime Green'} local folder = game.Workspace.Color:GetChildren() for i, v in…
monke
  • 1
  • 1
0
votes
0 answers

Unable to cast to dictionary - Luau/Roblox Lua

I'm building a game in Roblox and I'm trying to make an NPC go towards the player using PathfindingService, and when the path doesn't work it wanders. However, I keep getting the error message "Unable to cast to Dictionary - Server - Script" and I…
0
votes
1 answer

ImageLabel doesn't display in BillboardGUI

So, this is my problem. This script works with one image id, but not any others. I literally have no idea why this is happening. This is the script >> function newEntity(imgId, eName) EntityBase = Instance.new("Part", workspace) …
user15810432
0
votes
1 answer

Are you able to use number values as variables that can be called upon in Luau?

Im wondering if you would be able to use a number value as a variable that can be used in multiple different scripts
ben
  • 1
  • 2
0
votes
1 answer

Can you use a local script which is not inside a text button to write code for another text button in Luau?

The code is fine with no errors, just it doesn't work Heres the code: local clicks = 0 local plr = game.Players.LocalPlayer local cm = 1 script.Parent.MouseButton1Click:Connect(function() clicks = clicks + cm …
ben
  • 1
  • 2
0
votes
1 answer

Are you able to add code for other text buttons with a local script inside somewhere else in Luau?

So im making a cookie clicker made with gui in Luau and im trying to make it so when you click a button it takes cookies away and adds a multiplyer, but the script is inside the cookie button local cookies = 0 local plr =…
ben
  • 1
  • 2
0
votes
1 answer

How come my text wont change in roblox studio when i update it with a code?

So im trying to make a game about clicking cookies with Luau(roblox's version of lua) and the text property will change, but the new text will not actually show in game. Heres my script: local clicks =…
ben
  • 1
  • 2
0
votes
1 answer

Unable to assign property AnimationId. Content expected, got nil

I don't know what's happening, but i'm getting that error in output. Apparently every animations of the Anims table and normalcombo table exists, and the property too. I tested it in Commandbar but didn't work. I don't know how to fix it and don't…
takezo
  • 101
  • 7
0
votes
1 answer

Roblox plugin: How do I redirect the plugin user to a certain website?

I am currently making a Roblox plugin and I have created a help button. However, I want to redirect users to a webpage (let's say, example.com). Through all of the API pages that I browsed through, I could not find anything. Is it possible to do so?…
0
votes
1 answer

(Help) How to make the script below can be re run after respawn?

So, i am trying to make it can be re run after respawn but it does not work, i am kept struggling. My purpose with this script (autofarm, when the tween is done, it does waiting until respawn, when it's respawned, it does re run.) local function…
0
votes
2 answers

Is it possable to send keydown event and key up event?

is there a way to send a key down and key up event in Lua? Is it possible? (This is my first time asking a question here, I'm so nervous '~') I want it to help you auto-press the key without you touching anything, I am making a game in which you can…
1 2 3
8 9