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

How do I use BodyPosition to make a player go to a specific position?

Asked by 3 years ago

I've created this script to make this really cool sword that makes black hole bombs but that isn't important.

local pos = Instance.new("BodyPosition")
function onTouch(part) 
    local humanoid = part.Parent:FindFirstChild("Humanoid") 
    pos:Clone().Parent = humanoid.Parent.HumanoidRootPart
    pos.Position = script.Parent.Position
    end 

script.Parent.Touched:connect(onTouch)

I'm not used to using BodyPosition, so I assume that pos.Position should be the where the PLAYER would go but it just brings it high up the sky. Please help me with this. Thank you in advanced!

Answer this question