I've been trying for about an hour now and I'm not sure what is with this script that I'm messing up on. So this is going to subtract 1 every second from the NumberValue I placed in workspace which will affect the text in a text label. This is a serverScript placed in StarterPlayerScripts, the text label is in starter gui under a screengui and frame. Number value is in workspace.
valueThing = game.Workspace.Value.Value plr = script.Parent.Parent.PlayerGui.TimeScreen.Frame.TextLabel.Text while true do plr = valueThing valueThing = 500 wait(1) valueThing = valueThing - 1 end
Filtering Enabled is likely on, so with that being said - you can't change a player's PlayerGui from the server, you can only change it from the client. To do this you would need to fire a RemoteEvent
from your server loop to a client script that changes the text. Also your loop is a bit off I believe...
Server
local valueThing = game.Workspace.Value valueThing.Value = 500 while true do wait(1) valueThing.Value = valueThing.Value - 1 RemoteEvent:Fire(player, valueThing.Value) end
Client
local player = game.Players.LocalPlayer local gui = player:WaitForChild("PlayerGui").TimeScreen.Frame.TextLabel RemoteEvent.OnClientEvent:Connect(function(val) gui.Text = val end)
https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events