Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Words in my Script are Red, Every time I try to use "local" it turns red and doesn't seem to work?

So I'm a COMPLETE beginner to scripting on Roblox Studios

I added my first script under the Workspace, and tried to write a line using "local." in the line, however the "local" part of the line kept turning red and I have no idea why.

Anyone know why?

1 comment

0

you need to add a variable after local, like local Baseplate = workspace.Baseplate, or local RandomNumber = math.random(0,10)

1 answer

Remove the dot after the local. Dots are for getting the child of the aforementioned object, i.e. Players.Player.LocalPlayer.Character.Head. You don't need a dot after the local. Also, when you get an error, it should say what the problem is in the bottom left corner.

1 comment

0

Yes, don't put dot.

This discussion is preserved as it was. New answers, comments, and votes are closed.