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

gui visibility changing script not working at all?

so i made a script and a remote event to change textbuttons visibility im not getting any errors and its not working

remote local script (the local script is in startergui):

local button = game.Players.LocalPlayer.PlayerGui.Start.TextButton
local event = game.ReplicatedStorage.Events:WaitForChild("StartVisible")
event.OnClientEvent:Connect(function(plr)
	button.Visible = true
end)

and the script which is supposed to fire the remote:

local remote1 = game.ReplicatedStorage.Events:WaitForChild("StartVisible")
game.Players.PlayerAdded:Connect(function(plr)
	wait(5)
	if plr.Name == game.ServerStorage.Owner.Value then
		if game.ServerStorage.GameInProgress.Value == false then
			remote1:FireClient(plr)
		end
	end
end)

1 answer

Alright, I love the effort! There is no need to use RemoteEvent's, value's or anything to change the visibility of a Frame or any GUI object, it's easy as:

frame.Visible = false

Yes, it's that easy! In your case:

local frame = INDEX FRAME HERE

game.Players.PlayerAdded:Connect(function(plr)
    wait(5)
    if plr.Name == game.ServerStorage.Owner.Value then
        if game.ServerStorage.GameInProgress.Value == false then
            frame.Visible = true
        end
    end
end)

If you still don't understand please watch my video on visible/invisible GUI object's: https://www.youtube.com/watch?v=JouQxfkjB-s

If this helped please mark as solved!

2 comments

0

thanks for the answer but this was 3 days ago i already fixed that, still thanks for help

0

Oh ok, no problem, sorry for late response!

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