Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

MoveTo won't work?

Long story short, MoveTo won't move the model that spawns.

local bs = game.Workspace.battlestart

bs.Changed:connect(function()
	if bs.Value == "true" then
		wait(1)
		local enemy = game.ReplicatedFirst.Enemies:FindFirstChild(game.Workspace.battlestart.enemy1.Value)
		enemy:Clone().Parent = game.Workspace
		enemy:MoveTo(Vector3.new(game.Workspace.Arena.EnemySpawns.I))
	end
end)

Nothing is showing up in Output, either. The whole script works, except for the part that moves the model. I'm sure that I'm just making a stupid mistake, but I cannot seem to catch it. All help is appreciated.

1 comment

0

try printing game.Workspace.Arena.EnemySpawns.I

1 answer

✓ Accepted answer

MoveTo() needs a valid position.

Code:

enemy:MoveTo(game.Workspace.Arena.EnemySpawns.I.Position)

1 comment

0

Ah, I knew I made a stupid mistake! Thanks! :D

This discussion is preserved as it was. New answers, comments, and votes are closed.