Hello.
I've written a script (A script parented to ServerScriptService) and I tried to change the visibility of a frame parented to StarterGui.
The problem is that the Gui Visilibility does not become true even though I told it to do so.
After looking through some forums, I realised that it could be because I wasn't using a Local script, so I tried using > :FireAllClients() via a >RemoteEvent.
The thing is, even after using it with a Local script parented to PlayerScripts, the Gui Visibility still doesn't change.
local LocalPlayer = game.Players.LocalPlayer
local RankboardGuiAppearRemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("RankboardGuiAppear")
local RankFrameVisibility = LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("RankBoard"):WaitForChild("RankFrame").Visible
RankboardGuiAppearRemoteEvent.OnClientEvent:Connect(function()
RankFrameVisibility = true
wait(8)
RankFrameVisibility = false
end)
The code above is the one that starts running when the remote event is fired (dont judge, this is how i write my variables lol, very lengthy)
No error or anything. Got a completely clean Output. What could be the problem here?
Any help is appreciated! Thanks for your time!
