It is meant to open a curtain if a player in the group with a certain rank says a command but it cant be opened when it is already open. Nothing comes out in the output, I am the correct rank and everything but absolutely nothing happens. This is my script:
Amount = 0.1 GroupId = 1184081 GroupRank = 3 Part = script.Parent Open = false game.Players.PlayerAdded:connect(function(plr) if plr:IsInGroup(GroupId) and plr:GetRankInGroup(GroupId) >= GroupRank then plr.Chatted:connect(function(chat) if Open == false and string.lower(chat) == "Curtains, please!" then Open = true for i = 1,250 do Part.CFrame = CFrame.new(Part.Position.X,Part.Position.Y,Part.Position.Z+Amount) wait(.00001) end elseif Open == true and string.lower(chat) == "Thanks for watching!" then Open = false for i = 1,250 do Part.CFrame = CFrame.new(Part.Position.X,Part.Position.Y,Part.Position.Z-Amount) wait(.00001) end end end) end end)