I am trying to make a script like admin, the user whom name is in the script says start and for the amount of time set in the script a part opens like a door so people could walk through and after time closes, heres what I have so far.
Could someone help?
Hosts = {"CowLoverSecret"} -- Players who can host
open ={"start"} --Text that host says to begin letting players into the play area (DEFAULT: START)
openduration=5 --Seconds for players to get on their stands
sp=script.Parent
open=false
game.Players.ChildAdded:connect(function(plr)plr.Chatted:connect(function(Chat)if string.lower(Chat) == open thenfor i=1,#Hosts doif string.lower(Chat) == opensp.Transparency=1sp.CanCollide=falseopen=truewait(openduration)open=falsesp.Transparency=1sp.CanCollide=trueendendendend)
end)

1 comment
You really need to space and indent your code correctly. Also what exactly are you having trouble with?