I'm creating a follow script but it's saying "Vector3 expected, got number" even if there is a Vector3.
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
local enemy = game.Workspace:WaitForChild("Chef")
wait(1)
follow = false
while true do
if Character.UpperTorso ~= nil then
if Character.UpperTorso.Position - enemy.Torso.Position.X <= Vector3.new(10,0,0) then
follow = true
end
end
if follow then
enemy.Humanoid.WalkToPoint = Character.UpperTorso.Position.X
end
wait(0.5)
end
end)
end)
