It does? How is that possible? If you did it on a server script it wouldn’t replicate to the clients and if you did it on a local script it would simply be changing the startergui not the playergui
Changes to the server replicate to all the clients, otherwise if you do something in a server script, how would you, the client, see the change? Changing something on the client doesn’t replicate to to the server / the other clients though.
That makes sense, if you change something in the startergui then everyone who joins afterwards would receive that copy, which was updated. The startergui is just a container for all the guis, whenever you join, you get a copy of all the guis in startergui put in your playergui. This is why if you make a change to a gui in startergui, and then someone joins, they would get the changed version.
Yeah that’s the point I’m trying to make. The problem isn’t that he’s doing this in a server script but that he’s changing the starter gui’s version instead of your player gui’s version. Although it’s better to work with ui in local scripts so this should be a local script anyway. Maybe we should continue in dms because this post is getting pretty clogged.
I just get this when activating the script "Attempt to index nil with ‘PlayerGui’ " Also, its fine once we figure it out i can just set the solution for anyone who finds this.
You can’t use game.Players.LocalPlayer on the server so this would have to be a local script if you want to get the player like that. Where is this script?
It is a local script, and its in the workspace. I don’t know if it doesn’t work because the way I am doing it is this: It’s disabled, then i go into studio play mode, then i press server client and then enable it via explorer.
Local scripts have to be descended from the player/ the player’s character to run (for the most part).
Try this out: (This should be a local script inside your screengui)
local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
while true do
PlayerGui.bright.Frame.BackgroundTransparency = PlayerGui.bright.Frame.BackgroundTransparency -0.01
wait(0.01)
end
That works great, (and dont worry I am understanding you). However, it works fine if it is enabled before playing, but if i try to enable it during playing (via script and via explorer) it does not seem to work. I’ll set it as a solution since that is what I asked, the disable thing is a different topic sort of.
When you set the enable property you have to set it for the actual playerGui script not the starterGui btw. You can enable/disable by going inside your player