Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make this script work?

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?

1 comment

0

Edit it to put the code in the block.

1 answer

✓ Accepted answer
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)

2 comments

0

Thanks

0

Np.

This discussion is preserved as it was. New answers, comments, and votes are closed.