I don't really know how to go about scripting a "Push" how should I approach it? This is a snippit of the script, the part where I want the player to be pushed away. I want hum1, the target to be pushed away from the user. Also it is an attempt at rasengan from Naruto Lol.
Please Help... this is killing me
rasen.Handle.Touched:Connect(function(tag) local hum1 = tag.Parent:FindFirstChild("Humanoid") local animtrack2 = hum1:LoadAnimation(anim2) if hum1 ~= nil and db == false then hum1:TakeDamage(45) animtrack2:Play() animtrack1:Play() hum.WalkSpeed = 0 hum1.WalkSpeed = 0 rasen.Handle.explode.Playing = true hum1.Sit = true db = true local torso = hum1.Parent:FindFirstChild("Torso") local torso1 = char:FindFirstChild("Torso")
Use a Bodyvelocity
Insert a body velocity inside the enemy's Torso or HumanoidRootPart, and make them fly.
Link for better understanding:
https://developer.roblox.com/en-us/api-reference/class/BodyVelocity
You could use some lines like this ;
local bv = Instance.new("BodyVelocity") bv.Parent = (The enemy's Torso or HumanoidRootPart) bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge) -- This can be identified as the power bv.Velocity = (Your torso/HumanoidRootPart) .CFrame.lookVector *100