repeat wait() until game.Players:FindFirstChild("CurrentPlayer")
local player = game.Players.CurrentPlayer
print(player.Value)
local chr
function appear()
	cln = game.ServerStorage:FindFirstChild(""):Clone()
	cln.Parent = game.Workspace
	chr = game.Workspace:FindFirstChild(player.Value).Torso
	cln:MoveTo(chr.Position + chr.CFrame.lookVector*15)
	cln.Monster.WalkSpeed = 10
	cln.Monster:MoveTo(chr.Position, chr)
	wait(1)
	cln.Monster.WalkSpeed = 0
end

function disappear()
	cln:Destroy()
end

while wait(math.random(5,25)) do
	appear()
	wait(2)
	disappear()
end

So I just created this script which should clone a monster from ServerStorage and put him in Workspace, this part works perfectly. The monster should then walk toward the player for a second and stop, this part doesn't work. The player variable is correct its value is the player's name... any suggestions?

3 comments

0

Is CurrentPlayer a value in Players?

0

@spongocardo yes it is

0

Are there errors? You currently have no error checking in the event that there isn't any Character model with the name "player.Value"; or in the event that there is, that they do infact have a Torso.