Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Boolean not working how do I fix it?

Asked by 9 years ago

Instance.new("Part", game.Workspace) game.Workspace.Part.Name = "brick" game.Workspace.brick.Position = Vector3.new(124,-18,15) game.Workspace.brick.Anchored = True

The last part is not working and the "True" is underlined in blue

1 answer

Log in to vote
3
Answered by 9 years ago

The basic answer, booleans are NEVER capitalized.

Different languages handle Boolean syntax differently. Lua and Java both use uncapped like, "true" and "false". Whereas Python does not do this.

Also, I don't want you getting bad programming habits so you should probably consider writing your answer like this

local brick = Instance.new("Part", workspace); --Make a variable for easier referencing 
brick.Position = Vector3.new(124,-18,15);
brick.Anchored = true;
brick.Name = "Brick"
0
Wow, you're answering questions 24/7. EzraNehemiah_TF2 3552 — 9y
0
You wanna upvote my answer? DewnOracle 115 — 9y
0
Thanks Dewn, you really helping me out, really appreciate it MatiasSicarius 45 — 9y
0
No problem! Just keep scripting :) DewnOracle 115 — 9y
0
Also notice true/false turn blue when writing in Lua. If it's not blue, it's probably not right. Tkdriverx 514 — 9y
Ad

Answer this question