Help with creating a UI script

Sorry if I do any rookie mistakes on this post, I am fairly new to the DevForum.

The question I want to ask is, how would you go about making a UI that pops up on every players screen when a part is clicked?

I basically want you to be able to press a button, and a UI would become visible on the screen.

Use a remote event to fire information from the server to the clients. Then, when it is fired, make a local script detect that and show the screen. Make sure to use :FireAllClients.

1 Like

I would use ClickDetector, use that to fire a remote event.

1 Like
local RepStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = RepStorage:WaitForChild("RemoteEvent")  -- add Your Event here 
local ClickDetector =  --- Get the ClickDetctor 

ClickDetector.MouseClick:Connect(function(player)
RemoteEvent:FireClient(player)
`

1 Like

Since you are a rookie I would recommend learning how remote events work on youtube as it is extremely crucial for this. What ABHI said is correct you gotta use a remote event, and (remote event here that is pre-defined):FireAllClients(info here) to the local scripts. FireAllClients just basically means that it is sent to all the clients(players).

1 Like