repeat wait() until game.Players:FindFirstChild("CurrentPlayer")
if game.Players:FindFirstChild("CurrentPlayer") then
	plr = game.Players:FindFirstChild("CurrentPlayer")
	chr = game.Workspace:FindFirstChild(plr.Value)
	monster = game.Workspace.Monster
	monster.Parent = nil
	print(chr)
	function appear()
		monster.Parent = game.Workspace
		monster:MoveTo(chr.Torso.Position + chr.Torso.CFrame.lookVector*15)
		monster.Monster1.WalkSpeed = 7
		monster.Monster1:MoveTo(chr.Torso.Position, chr.Torso)
		wait(1)
		monster.Monster1.WalkSpeed = 0
		wait(2)
		monster.Parent = nil
	end
	
	while wait(math.random(5,10)) do
		appear()
	end
else
	print("Fail")
end

So I created this script recently and it works perfectly in Solo mode, but whenever I try it in online mode, the monster spawns properly but does not walk to me as I want it to do. Any suggestions? No errors.