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

How can I push my " target " in my direction with bodymovers?

I tried to use bodymovers before in my script and its the last part of that ability but now it looks like the target gets " teleported " I used

hitCharacter.Torso.CFrame = CFrame.new(hitCharacter.Torso.CFrame.p-Vector3.new(
0,0,-30)) b

but then it looks like it gets teleported everything is finished of the script only that part so what bodymover do I have to use so it really get pushed? I dont really understand the WIKI or examples

any help is greatly appreciated.

1 answer

local Push = Instance.new("BodyVelocity", hitCharacter.Torso)
Push.Velocity = Player.Character.Torso.CFrame.lookVector * 80
Push.MaxForce = Vector3.new(math.huge, math.huge, math.huge)

local Distance = Instance.new("BodyPosition", hitCharacter.Torso)
Distance.MaxForce = Vector3.new(0, 30000000, 0)
Distance.Position = Vector3.new(0, hitCharacter.CFrame.p.Y + 15, 0)

wait(2)

Push:Destroy()
Distance:Destroy()

6 comments

0

Thanks man I will try it.

1

you don't answer with just code.... give it an explanation of some sort.

0

oh yes well I make a force push ability and

0

Im using pressedXHandler I editted your script a bit it worked in studio and the push also works with hitCharacter.Humanoid.Sit and stuff

0

I will set it on answered but first I will test it in game to be sure and Im also new to this part never really worked before with bodymovers so thank you

0

And how can I minimize the push and do it so it pushes in the direction I stay?

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