script.Parent.Touched:connect(function(part) gui = script.GuiNameHere:Clone() if part.Parent:FindFirstChild("Humanoid") then supermarioworld323 = part.Parent.Name if game.Players:FindFirstChild(supermarioworld323) then gui.Parent = game.Players[supermarioworld323].PlayerGui end end end)
How do you make this script work for everyone?
function g(h) gui = script.GuiNameHere:Clone() if h.Parent:findFirstChild("Humanoid") then Hum = h.Parent:findFirstChild("Humanoid") if game.Players:findFirstChild(Hum.Parent.Name) then gui.Parent = game.Players:findFirstChild(Hum.Parent.Name).PlayerGui end end end script.Parent.Touched:connect(g)