Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does it say nil value everytime?

Asked by 7 years ago
Edited 7 years ago

In a localscript in a gui in startergui:

plr = game.Players.LocalPlayer game.Workspace:WaitForChild("TestFunction"):InvokeServer(game.Players:WaitForChild(plr.Name).PlayerGui.ScreenGui:WaitForChild("TestLabel"))

In a script in workspace:

local eventc = Instance.new("RemoteFunction") eventc.Parent = game.Workspace eventc.Name = "TestFunction" function eventc.OnServerInvoke(player, labelx) labelx.Text = "Whatever" end

Yet it says labelx is a nil value.

EDIT: Apparently GUIs in StarterGui are not replicating to the server... I just sticked to editing text locally.

1
Use a code block. AdvancedCode 136 — 7y
0
Please use code block. BlackOrange3343 2676 — 7y
0
If FE is on, GUIs do not replicate to server. Thundermaker300 554 — 7y

Answer this question