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

Screen GUI doesn't change value in FE?

Asked by 6 years ago
Edited 6 years ago

I have a GUI at the top of a players screen in my game, but for some reason, the values don't change. I realized that the game was filtering enabled and immediately added a RemoteEvent due to the fact that the script in the GUI was a local script and the main server script was changing it. The script I have to fire the server is below:

game.ServerStorage.Status.Changed:Connect(function()
    game.ReplicatedStorage.StatusChanging:FireAllClients()
end)

This works fine in studio along with the other script, but not in the real game. The script I have to recieve the server event is below (The RemoteEvent is called "StatusChanging"):

game.ReplicatedStorage.StatusChanging.OnClientEvent:Connect(function()
    script.Parent.Frame.TextLabel.Text = game.ServerStorage.Status.Value
end)

I have no prediction for the outcome of this as I have tried everything within my knowledge to get the GUI to show up, but it is quite hard because it does show up in studio. Thanks in advance for helping me solve it.

-Cmgtotalyawesome

0
Also, no need to fire the client. The server can change the client just fine, just the client can't change the server. ee0w 458 — 6y
0
Go into the real game and go into the Developer Console and look for errors. That's all I could think of.. DatOneRandomDude 69 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

LocalScripts cannot access ServerStorage. Try placing Status in ReplicatedStorage instead.

0
Thats what I had before but it still didn't work in the real game.. Any other ideas? cmgtotalyawesome 1418 — 6y
0
(I am changing it back) cmgtotalyawesome 1418 — 6y
0
Which script is the local script? The first or the second? cowsoncows 951 — 6y
0
If you're simply trying to change the gui from a server script, I don't believe you need a RemoteEvent. You can access their gui's through `Player.PlayerGui` and I believe it should work, even with FilteringEnabled. I haven't tested it in studio, though. cowsoncows 951 — 6y
View all comments (2 more)
0
The only problem I can see with that is that it takes time to get through every player, meaning that some of their intermissions would be off cmgtotalyawesome 1418 — 6y
0
If anything it would be more efficient than firing a RemoteEvent every second for every player cowsoncows 951 — 6y
Ad

Answer this question