I can't get the Frame to appear

Well like I said, I can’t get the frame appear even though I looped through all of the players and created a pathway to the playerGui

-- This lines of code are in serverscriptservice
for _, player in pairs(game.Players:GetChildren()) do
     player.PlayerGui.VotingSystem.Frame.Visible = true
    end

Hey again. My guess is that there’s no players in the game once that code is ran.
Try to print the players name and see what it outputs.

Ok I added a wait() before the loop, now it says this: VotingSystem is not a valid member of PlayerGui

Is the VotingSystem GUI in the StarterGui?

Yes it is (30 characterssssssss)

You cannot access PlayerGui in server scripts, so fire a remote event instead. Also, use GetPlayers() no GetChildren()

Try using a remote event.

like, insert the event into ReplicatedStorage

Here:

-- a local script, opening the voting system. Try putting this in the frame.

local event = -- path to remote event

event.OnClientEvent:Connect(function()
    script.Parent.Visible = true
end)
-- The Server Script where you're making the frame visible for everyone
local event = -- path to remote event
event:FireAllClients()
1 Like