Hey guys! I hope you do very very well! Being direct:
I am testing a “story game” Gui scripting, but when I test this script on 8 players Server (Roblox Studio Tester) It shows one text for one person and another text to another (It doesn’t show everyone at the same time the different texts but it goes faster or slower for different persons).
The rare thing is that when I try this with 3 players Server It doesn’t show this problem. So I don’t know if It’s a lag issue or in a normal Roblox Server it won’t show this problem.
Example Error:
As you see the player screen in the left is seeing “Wi” and the one on the right is seeing “With everything said, I’ll”.
I think this may be because there’s too much player’s on a single PC (because of Roblox Studio LocalServer) but I’m not sure so here am I asking you.
I’ll appreciate you, your heart and your help if you can give me a hand with this.
My system works in the following order:
1-) A ServerScript changes a ReplicatedStorage BoolValue
2-) A LocalScript detects the Changement and if Its value == true then the LocalScript starts showing the player the Text (Changin the SampleGui.TextLabel.Text)
3-) It fires a RemoteEvent (FireServer) and a ServerScript (OnServerScript) changes another BoolValue (to do different things like making a 30 second round to eat for example or go to sleep)
4-) Another LocalScript continues the loop
I don’t know If It’s my system fault or it’s just a lag problem on Roblox Studio LocalServers
I don’t want the game to have this “lag” issue, and If it is like that on Normal Roblox Server It would be very very bad for my story game.
- Here’s one of the LocalScripts(Example):
game.ReplicatedStorage:WaitForChild('ActivateRoundMoments').NarratorExplainsHowGameWorks.Changed:Connect(function()
if game.ReplicatedStorage:WaitForChild('ActivateRoundMoments').NarratorExplainsHowGameWorks.Value == true then
local player = game.Players.LocalPlayer
local textLabel = player.PlayerGui.NightTest.RuleExplicationText
textLabel.Visible = true
if textLabel.Visible == false then
textLabel.Visible = not textLabel.Visible
end
local function typewrite (object, text, length)
for i = 1, #text,1 do
object.Text = string.sub(text,1, i)
wait (length)
end
end
wait(3)
typewrite (textLabel, "Hello everybody...", 0.07)
wait(1.3)
typewrite (textLabel, "Let me present myself.", 0.07)
wait(1.3)
typewrite (textLabel, "I'm the narrator. And I will be guiding you to play the game correctly.", 0.07)
wait(1.7)
typewrite (textLabel, "First, let me explain you the rules.", 0.07)
wait(1.3)
typewrite (textLabel, "I will give you 30 s to hide", 0.07)
wait(1.7)
typewrite (textLabel, "And if I found you you'll lose ", 0.07)
wait(1.3)
typewrite (textLabel, "With everything said, I'll start the countdown", 0.07)
wait(1.7)
textLabel.Text = " "
textLabel.Visible = false
if textLabel.Visible == true then
textLabel.Visible = not textLabel.Visible
end
game.ReplicatedStorage:WaitForChild('RemoteEvents').ActivateCountdown:FireServer()
end
end)
- ServerScript BoolValue Changer(This is an example, It’s not the original one but It does the same work):
wait(3)
for i = 30, 1, -1 do
i = i - 1
print(i)
task.wait(1)
end
print('Loop ended')
game.ReplicatedStorage:WaitForChild('ActivateRoundMoments').NarratorExplainsHowGameWorks.Value = true
- Player Gui Structure:
I appreciate very very much you and your help, thank you so much, and have a nice day! Bye!