Hey everyone! My script is being super slow when I transferred it to another game, anyone know how to fix this?
What should happen: https://gyazo.com/87b56171ce98f9cec2b5b26590c13266
What actually happens in the transferred game: https://gyazo.com/1eb3b9210261a96e2166cb6605992acf
local groupId = 123456 local adminRank = 9 local timer = 3 - local typespeed = 0.05 local textlabel = game.Workspace.Rulesboard.RulesBoard.SurfaceGui.Rules local ReplicatedStorage = game:GetService("ReplicatedStorage") local remoteEvent = ReplicatedStorage:WaitForChild("RulesEvent") local remoteEvent2 = ReplicatedStorage:WaitForChild("RulesEvent2") local function typewrite(object,text) for i = 1,#text,1 do object.Text = string.sub(text,1,i) wait(typespeed) end end function onChatted(msg, speaker) if speaker:GetRankInGroup(groupId) >= adminRank then local source = string.lower(speaker.Name) msg = string.lower(msg) if string.find(msg, "!rules") then remoteEvent:FireAllClients() wait(1) typewrite(textlabel,"Hey there! Welcome to Embassy's Training Centre. Before we begin, there are some rules you must be aware of.") wait(timer) typewrite(textlabel,"Please ensure that you are listening to your trainer's instructions through out the session.") wait(timer) typewrite(textlabel,"If you're planning to idle or afk, notify your trainer. You do not want to be falsely removed from the training session.") wait(timer) typewrite(textlabel,"Please make sure that you use flawless grammar to the best of your potential, as it is important in getting good results.") wait(timer) typewrite(textlabel,"If you have any questions, feel free to ask a trainer. Do not ask the host or co-host.") wait(timer) typewrite(textlabel,"Do not leave until you have been kicked by a high rank. Otherwise, you may not receive your rank.") wait(timer) typewrite(textlabel,"If you are seen roaming around freely without permission, you will be removed from the training session.") wait(timer) typewrite(textlabel,"We are now prepared. Please follow your respective trainers into the training rooms. Good luck trainees!") wait(timer) remoteEvent2:FireAllClients() else end end end game.Players.PlayerAdded:Connect(function(player) player.Chatted:connect(function(msg)onChatted(msg, player) end) end)
Please help me, all help is appreciated.