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

How do I make a part that when touched will show a GUI?

Asked by 6 years ago

I'm trying to make a GUI that pops up when you touch it a GUI pops up.

game.Players.PlayerAdded:Connect(function(plr)
script.Parent.Touched:connect(function(hit)
 if hit.Parent:FindFirstChild("Humanoid") then
    game.StarterGui.ControlPanel.book.Visible = true
wait(1)
 end
end)
end

I'm a bit of a noob, so please go easy on me! :)

0
This appears like it isn't FE compatible. You may have FE disabled, and may have already done so much work, but for any future projects you create, i'd recommend learning the basics of how to make a game work in FE. This is mainly going to render exploiters powerless, as they can no longer cause any major damage to a server, such as deleting the workspace. YaBoiToasterLord 80 — 6y

1 answer

Log in to vote
0
Answered by
Filipalla 504 Moderation Voter
6 years ago

The problem here is that you're refering to the service StarterGui which puts it in the players PlayerGui when in play mode

game.Players.PlayerAdded:Connect(function(plr)
script.Parent.Touched:connect(function(hit)
 if hit.Parent:FindFirstChild("Humanoid") then
    plr.PlayerGui.ControlPanel.book.Visible = true
wait(1)
 end
end)
end

If you edit it in the StarterGui it will replicate to all players when they respawn next time

Ad

Answer this question