I am making a game and at a certain time a frame appears but i need it to some how appear from a script in serverscriptservice i tried
game.StarterGui.MainGui.Frame.Visible = true
but its not working is there a possible way to do this
I am making a game and at a certain time a frame appears but i need it to some how appear from a script in serverscriptservice i tried
game.StarterGui.MainGui.Frame.Visible = true
but its not working is there a possible way to do this
Well, don't index StarterGui while messing woth the properties of GuiObjects. Now, if you want every player's frame via Server Script, you can do :
for _, player in ipairs(game.Players:GetPlayers()) do -- Starting a for loop as ipairs
local PlayerGui = player:WaitForChild("PlayerGui") -- The contents of StarterGui gets copied to PlayerGui, which is located inside the player Instance
local Frame = PlayerGui.ScreenGui.Frame
Frame.Visible = false
end
The important thing is to get the player's instance from server, if you succeed, you can do anything from server to PlayerGui.
Lemme know if it helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
but how do i put this in my script
Well, you have not included your script, you can put it at the part when you want it to fire.