0

# GUI Visible to different players in the Game?

Hello Developers,

I'm Creating a game and want to make a "Roll The Dice GUI" Visible to only a specific client. I have absolutely no idea how to do that. If you guys could help me out that would be great.

-Carter

0

All you have to do is clone the GUI via local script. So, if you have a button that you click, that should be a local script. The button could then clone a GUI from replicated storage into the player that clicked the button.

Or you could use a remote event to fire a specific client and do something that way.

0
Edited 6 months ago

Hello, I wanted to answer your question since I've been able to solve this, though I do not know if you want when a GUI button is clicked it shows/hides the GUI or if you click a part you get the GUI, so I'm gonna tell you how could you do this with a GUI button.

1- Go to StarterGui and insert a ScreenGui. 2- Add a TextButton and a TextLabel to the ScreenGui. 3- Type whatever you want on the Text of the TextLabel. (Optional) 4- Add a LocalScript to the TextButton. 5- Type this on the LocalScript:

script.Parent.MouseButton1Click:Connect(function()
local Gui = script.Parent.Parent.TextLabel
if Gui.Visible == false then
Gui.Visible = true
elseif Gui.Visible == true then
Gui.Visible = false
end
end)


What this script does is that if the TextLabel is visible, it makes it invisible and vice versa.

I could also help you to make a Dice with a randomly generated number, but only if you'd like me to. If you are very new with scripting, I could give you a more in-depth explanation about this.

0
No Its fine I've already made the dice roll and picks up the face that is the highest. anyway How would this make it appear to a 1 client? manipulativefixation 0 — 6mo
0
Well, simply because it's a LocalScript, LocalScripts are scripts only shown or for only the client that runs the script. PapalMache 15 — 6mo