So I am working on a Training Holo and the string wont work! So far a couple of people have helped me out but anyways,heres what I have so far it doesnt seem to be working so I need help!
a=Holo.configuration b=a.RankId c=a.GroupId game.Players.PlayerAdded:connect(function(plr) if player:GetRankInGroup(c.Value) >= b.Value then player.Chatted:connect(function(msg) if string.lower(chat) == "sf" game.Lighting.Thing:Clone().Parent = game.Workspace elseif string.lower(chat) == "close sf" then if game.Workspace:FindFirstChild("Thing") then game.Workspace.Thing:Remove() end end
First, tab and space your code properly.
game.Players.PlayerAdded:connect(function(plr) if player:GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then plr.Chatted:connect(function(msg) if string.lower(chat) == "sf" then if not game.Workspace:FindFirstChild("Thing") then game.Lighting.Thing:Clone().Parent = game.Workspace end elseif string.lower(chat) == "close sf" then if game.Workspace:FindFirstChild("Thing") then game.Workspace.Thing:Remove() end end end end)
You'll see you're missing a final end)
and have misplaced the final parenthesis )
.
You never defined player
(your parameter is plr
).
You never defined config
.
You should test incrementally. Not write 20 lines and hope it all works. That's a stupid way to do things. Write two lines at a time, and then test. Also, use the output since it would have told you all three of these errors.