Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This Follow Script isn't working even though It has printed everything?

Asked by 6 years ago
local BP = script.Parent:WaitForChild('SpiderTorso').BodyPosition
local Distance = script.Parent:WaitForChild('Stats').Distance

while wait() do
    for _, player in pairs(game.Players:GetPlayers()) do
        print('Players')
        if (BP.Position - player.Character.HumanoidRootPart.Position).magnitude <= Distance.Value then
            print('In Distance')
            wait()
            BP.Position = player.Character.HumanoidRootPart.Position + Vector3.new(0, 10, 0)
            print('Chasing Player')
        end
    end
end

No errors, printed everything doesn't work though

Here the properties for the BodyForce D = 500 Max Force = 100, 100 , 100 P = 10000

Someone please give me a fix or tell me how to fix.

0
I just tried it. The properties are the problem here. Your Max Force is WAYYY too low for the part to move. If you had it's collisions disabled you would see the part fall through the map and dissapear. Make the force much bigger and it'll work. iiSpeak_Lua 35 — 6y

Answer this question