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

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

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! :)

1 comment

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.

1 answer

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

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