Title says it all, How do i fling a person?, tried multiple scripts but they dont really work out for me. I need know how to make one that works good and has a good vibe for my game i am making.
Thx
Title says it all, How do i fling a person?, tried multiple scripts but they dont really work out for me. I need know how to make one that works good and has a good vibe for my game i am making.
Thx
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:wait()
local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
repeat RunService.Stepped:wait() until Character and HumanoidRootPart -- once player loaded
wait(5) -- waits 5
local X, Y, Z = math.random(1, 500), math.random(1, 1000), math.random(1, 500) -- our fling coordinates
Humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) -- this will make it so the player is stunned.
HumanoidRootPart.Velocity = Vector3.new(-X, Y, -Z) -- we change the velocity here.
Hope this has helped as for my knowledge there's many 'efficient' ways you could go about doing something such as this but this is a reliable and 'efficient' method, also keep note that this is a client script.
Have a great day.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
body forces, you can look them up on the roblox developer wiki
What Code are you using?