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

How to use PlayerGui to display Gui only for once player?

I made a cooldown system where if the player presses a button a cooldown gui appears. But it appears for every player ingame. I heard of PlayerGui and Think that could make it so the gui would work for all players but also on be visible to the player that connects the function. If theres a easier or better solution please let me know.

Heres my code:

local remote = game.ReplicatedStorage.TheWorld.BaconTimeStop

remote.OnServerEvent:Connect(function()
	script.Parent.Ts.TextLabel.Visible = true
	script.Parent.Ts.Visible = true
	wait(60)
	script.Parent.Ts.Visible = false
	script.Parent.Ts.Frame.Visible = false

end)

1 answer

Use a local script

1 comment

0

When I use the local script it says I cant use server event in a local script. But when I change it to a client event the cooldowns dont work.

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