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

is there a way to make a frame visible from a script in serverscriptservice?

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

1 answer

✓ Accepted answer

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!

2 comments

0

but how do i put this in my script

0

Well, you have not included your script, you can put it at the part when you want it to fire.

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