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

How Can I Make A Gui Popup When I Enter An Area Of The Map?

Asked by
yayachik1 -11
5 years ago

how can i make a gui that pops up showing my current location im in when i go to a certain area?, one way i would think about going about doing this would be to make a gui, and make a transparent, locked, cancollide false part and when you walk into it have it trigger a script that makes a gui popup using script.Parent.Touched:connect but i don't exactly know how to script it, if anyone can help me with scripting this it would be greatly appreciated.

0
You need to use region3 to make it work. Search it up on youtube, it is very simple. It is too much to explain here. Thesquid13 301 — 5y
0
Depending on the map you could also use a distance check. But as you said a local part that will display the gui on touched will be simple. Just place the GUI in rep storage and clone them when needed. User#5423 17 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

A magnitude check isn't the best option, so I suggest you just have a hitbox at an entrance that triggers a GUI to be given to a player.

The simple code to it would be something like..

script.Parent.Touched:connect(function(part)
if game.Players:GetPlayerFromCharacter(part.Parent) then
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
if not plr.PlayerGui:FindFirstChild("popupgui") then
game.ServerStorage:FindFirstChild("popupgui"):Clone().Parent = plr.PlayerGui
end
end
end)
Ad

Answer this question