I'm trying to make a GUI pop up when an invisible brick is touched, and lets people of a certain rank through. The rank part works fine, but the GUI script only runs once. I also have MADE SURE the GUI is destroyed in some way, and doesn't stay there out of sight. My code:
local config = script.Parent.Configuration script.Parent.Touched:connect(function(part) if part.Parent and game:GetService('Players'):GetPlayerFromCharacter(part.Parent) then local player = game:GetService('Players'):GetPlayerFromCharacter(part.Parent) if player:GetRankInGroup(config.GroupId.Value) >= config.RankId.Value then if not player.PlayerGui:FindFirstChild("MakeGui") then script.Parent.MakeGui:Clone().Parent = player.PlayerGui end script.Parent.CanCollide = false wait(.4) script.Parent.CanCollide = true end end end)
Please help!