Hi! I’m currently having trouble with my Gui. When you reset then the text just stops updating. I used a tutorial for a typewriter affect and if you die/reset while its still typing, the entire thing just stops.
I have tried looking on the devforum and yes I did set the resetonspawn to false on the screengui.
I have no idea how to fix this.
Local Script:
local function Type(Gui, Text, Time)
for i = 1,#Text,1 do
Gui.Text = string.sub(Text,1,i)
if i == "." then
wait(1)
end
wait(Time)
end
end
workspace.RemoteEvent6.OnClientEvent:Connect(function(msg)
local T = game.Players.LocalPlayer.PlayerGui.System.MessageFromSystem.TextLabel
if msg == "-setgame Hide and Seek" then
T.Parent.Visible = true
Type(T, "Game Chosen: Hide and Seek.", 0.07)
wait(3)
Type(T, "Hide and seek is a game where Ash or Godly may try to hunt you and find you.", 0.05)
wait(3)
Type(T, "A random lucky person may also be chosen to hunt along, or may do it with another player as Godly and Ash supervise.", 0.03)
wait(4)
Type(T, "You may NOT team with any seekers if you are a hider as this is unfair to other people playing. Also you can steal someone's hiding spot even if they are protesting against it.", 0.04)
wait(3.5)
Type(T, "Now with that said, may the game begin.", 0.04)
wait(3.5)
T.Parent.Visible = false
workspace.RemoteEvent7:FireServer("Hide and Seek")
Maybe put this in the serverScript that calls RemoteEvent6, and just loop through each player, because RemoteEvent7 just goes back to server, which I think is pointless.
Also, a rule of thumb, RemoteEvents go in the ReplicatedStorage, don’t rely on the client to send the Server a message, as the client may leave the game.
And an FYI, you can use RemoteEvent6 to both, send a message to a/all client(s), and send a message to the Server.
However this information may or may not help, as I don’t specifically know how your code works/functions, or how it is intended to work/function.
I think you should just loop through the Players that will see the text from the Server and see if that works.
Depending on how the server is running, definitely don’t do what I said above, just don’t rely on a client to send the RemoteEvent7:FireServer("Hide and Seek") event.
Other than that, and moving the events to ReplicatedStorage, I don’t know how to fix this.
Still send the info to the Client, but on the server, use a wait statement, so that the Server doesn’t rely on a client and can’t get influenced by a hacker.