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

My script refuses to change GUI text how to fix?

Asked by
ym5a 52
3 years ago
01local sign = game.Lighting:FindFirstChild("SING")
02local houso = game.Lighting:FindFirstChild("door")
03local tnt = game.Lighting:FindFirstChild("dynamite")
04local towa = game.Lighting:FindFirstChild("tower")
05 
06wait(5)
07among:Clone().Parent = workspace
08me:Clone().Parent = workspace
09sign:Clone().Parent = workspace
10houso:Clone().Parent = workspace
11tnt:Clone().Parent = workspace
12towa:Clone().Parent = workspace
13print("cloned")
14local scrips = game.ServerScriptService.lava:GetChildren()
15for i,v in pairs(scrips) do
View all 40 lines...

The comments I put are the lines to focus on. Solutions i have tried: RemoteEvents If BoolValue == true statements Just doing it from the actual script

This is NOT a localscript and the location of this script is in a folder in ServerScriptService

1 answer

Log in to vote
1
Answered by 3 years ago

It doesn't work because you are trying to call StarterGui and GUIs can only be edited via a LocalScript. StarterGui replicates to the LocalPlayer. If you want to call your GUI via a server script you must do:

1game.Players.PlayerAdded:Connect(function(player)
2player.PlayerGui.(GUI NAME AND THINGS HERE)
3end)
0
I want this to happen if the lava is rising, I want it to tell you what "disaster" will or is happening, and I want to end right when the disaster is over, how would I do this? would I use a boolvalue? ym5a 52 — 3y
0
Nvm I figured it out thanks for this block though it helped ym5a 52 — 3y
Ad

Answer this question