Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make this script work?

Asked by 10 years ago
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?

0
Edit it to put the code in the block. ultrabug 306 — 10y

1 answer

Log in to vote
1
Answered by
Hybric 271 Moderation Voter
10 years ago
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)
0
Thanks supermarioworld323 45 — 10y
0
Np. Hybric 271 — 10y
Ad

Answer this question