Updated on Server but not client?

So I’m currently working on a story
I have 3 string values: a message box value alongside the speaker(who is speaking) and the type of speaker(plr/npc). All used for the purpose of the UI
image

The message box alongside the icon of the player are updated in a script in serverScriptService. The script is called sceneExecuter
image

It all works perfectly fine until this:
There would be points where a single player interacts with an object and only them will receive the message box, basically a private message. This is sent through the a remote event one time, server to client.
Server Script: Touching block, a cave entrances that player cant go through
image
Local script in Gui: It updates the message and the speaker(assigned char) and the class the player is, which in this case, is always “Plr”
image

This works but ends up breaking the message system for the client when the server would update its own message to the client. The server manages to change one of three strings values on the client side but for some reason, doesn’t update the other two. speakerBox( message value) changes but the speaker and class values don’t.

So basically, server sends message to all → client receives → client interacts with private message → the 3 string values are sent through server to the single client → client recieves message on UI just to them → Server sends message to all → client doesnt update to the current server values of the 3 string values besides the message string value

The issue basically starts whenever the remote event, server to client, is fired. It confuses me why the scene Executer script would not update both client and server as it did before the the remoteEvent. Confuses me even more on why the message value does get update for the client but the other 2 string values don’t: the speaker value and class value (type of speaker)
The client gets updated as long as the remoteEvent is never launcher but I don’t want to have to remove the feature as it adds more interactivity between individuals and the environment.

This has nothing to do with the visuals. I checked both in client and server side for the 3 string values and the values are different for the speaker and class (type of speaker)
I just want potential issues thrown towards me. I can probably fix it if I knew the issue; but since I don’t, I am legit bamboozled
Solution I came up with: I guess my only solution is fire the same remote event to all the clients so it’ll update the client. I still don’t understand why my script does not update the client
I tried searching this issue but I always got posts with people struggling with server updates instead of client updates. Sorry if this was a long to read, first post and I struggle wording things in an understandable matter.

2 Likes

I couldn’t find a solution on this but I would suggest doing
local plr = game:GetService("Players"):GetPlayerFromCharacter(h.Parent)
And then
local assignedChar = plr.Character.
There is no property for the player instance called “Char”, it’s “Character”
(Server Script)

Char is a string value placed in the player. The game basically assigns you 1 character out of 6 so you don’t play as your own character.

2 Likes