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 11 years ago
1script.Parent.Touched:connect(function(part)
2gui = script.GuiNameHere:Clone()
3if part.Parent:FindFirstChild("Humanoid") then
4supermarioworld323 = part.Parent.Name
5if game.Players:FindFirstChild(supermarioworld323) then
6gui.Parent = game.Players[supermarioworld323].PlayerGui
7end
8end
9end)

How do you make this script work for everyone?

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

1 answer

Log in to vote
1
Answered by
Hybric 271 Moderation Voter
11 years ago
01function g(h)
02gui = script.GuiNameHere:Clone()
03if h.Parent:findFirstChild("Humanoid") then
04Hum = h.Parent:findFirstChild("Humanoid")
05if game.Players:findFirstChild(Hum.Parent.Name) then
06gui.Parent = game.Players:findFirstChild(Hum.Parent.Name).PlayerGui
07end
08end
09end
10 
11script.Parent.Touched:connect(g)
0
Thanks supermarioworld323 45 — 11y
0
Np. Hybric 271 — 11y
Ad

Answer this question