This script repeats itself every time the player resets, can you help explain the reason and tell me how to fix it?
local player = game.Players.LocalPlayer
wait(0.2)
if game.Players.LocalPlayer.Name == 'legoboy78123' then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed +8
player.PlayerGui.BeastGui.Enabled = true
else
player.Character.Humanoid.WalkSpeed = player.Character.Humanoid.WalkSpeed -4
player.PlayerGui.HumanGui.Enabled = true
game.ReplicatedStorage.PlayerMusic.Playing = true
game.ReplicatedStorage.PlayerMusic.TimePosition = 0
end

3 comments
Where is this script located?
If it's located in a gui, make sure that 'ResetOnSpawn' is set to false
Just like what he said ^^^ ... Script is ran if a player spawns, so your script could be in StarterGUI, Pack, any Starter Folders.