Hi, ive been scripting a story game and i have my text label changing but when i test it with my freinds, when the text label is mid changing, my freind's text label on their screen starts from the start. How do i fix this? This is my script - i've got a typing text gui so it looks like this:
local text3 = " Hello, how are you?" for i = 1, #text3 do script.Parent.Text = string.sub(text3, 1 ,i) wait() end
this script is in a script located inside of my TextLabel.
I need help how i can fix this since if i keep it like this then it would be a disaster because different players would be at different points of the story instead of being on the same point of the story! Please help! If I don't find a solution then it is all over. Please help. Thankyou!
I am unable to confirm what you are doing wrong since you did not post any code.
However, the best way to handle this is by using remote events. Using a server script, you can use :FireAllClients(message)
to tell the clients to update their text to the message given. This way, it will be simultaneous.
Hello. I do not have a direct answer, but I do have a compiled list of reasons why this may happen: - The code is located in a localscript, and will only update for the client - You did not reference the GUI correctly
for i,v in pairs(game.Players:GetChildren()) do v.PlayerGui.Label.Text = "Desired text change here" end
Do keep in mind this is not a direct fix and is more insight as to why this may be happening.