You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to make it so when you touch this button, It will make an overhead GUI appear, but only for you and not the whole server
Context: Player1 Touched the part, Player1 got the GUI on his end, but so did Player2. It is showing the original billboardGUI on each player even though both players have the second GUI on their head. I want it to show the second GUI to only the player who touched the brick
What is the issue? Include screenshots / videos if possible!
When I touch the button, the GUI appears, but it will appear on top of EVERY players head instead of whoever touched the brick
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried to put it into the player GUI but I do not know how to do it properly without it just dissapearing
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local brick = game.Workspace:WaitForChild("EventGUIPopup")
local gui = script.Parent
local gui1 = script.Parent.Parent.BillboardGui
brick.Touched:Connect(function()
gui.Enabled=true
gui1.Enabled=false
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
If the button code runs in a local script, changes won’t replicate, meaning only that single player will see them(basically they won’t exist on the server side, as if they were never made).
brick.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
remoteEvent:FireClient(plr)
end
end)
Oh I see, I assume you copied the script multiple times, so when the brick is touched by anybody, it activates all those copied local scripts at once, causing this effect. What you need to do instead is create a relation between the UI you want to enable and the brick being touched, for example, a link related to the player touching the brick:
brick.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if not player then return end
local character = player.Character
--get the correct UI from the player or character path and activate that
end)
The code above will still fire all the .Touched events in the multiple local scripts running in parallel but ignore them all unless the player touching the brick is related to the UI being activated. Of course for the above code sample to work you need to figure out the path from the character to gui and gui1, and then use their .Enabled properties as you wish to achieve the desired result.