#How would I launch a player forward in their direction using bodyforce?
17 messages · Page 1 of 1 (latest)
Example of the script ^^
Basically I want the player to be launched in the direction they are facing but it always goes sideways
ok
ignore the clone.textlabel.text stuff thats just a countdown
local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:wait()
PlayerGUI = players.LocalPlayer.PlayerGui
script.Parent.Equipped:Connect(function()
local Boost = Instance.new("BodyForce")
local countdown = script.Parent.RocketBootsGUI
local clone = countdown:Clone()
repeat wait() until workspace[player.Name].Humanoid.Jump == true
Boost.Force = Vector3.new(0, 10000, 10000)
Boost.Parent = workspace[player.Name].Torso
wait(3)
Boost:Destroy()
print("done")
end)
I am very trash at scripting and there are no tutorials online
Gimme 5 mins, I'm cooking dinner. I'll try to help when I'm done.
** You are now Level 6! **
It's fine now, I fixed it by adding this.
Boost.Force = Vector3.new(30000, 1000000, 30000) * workspace[player.Name].Torso.CFrame.LookVector
--instead of
Boost.Force = Vector3.new(30000, 1000000, 30000)
👍
was just what I was doing, adding a lookvector
local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:wait()
local PlayerGUI = players.LocalPlayer.PlayerGui
local Boost = Instance.new("BodyForce")
repeat wait() until workspace[player.Name].Humanoid.Jump == true
Boost.Force = Vector3.new(0, 10000, 10000)
Boost.Parent = workspace[player.Name].Torso
wait(3)
Boost:Destroy()
print("done")```
But I guess you don't need that anymore 🤷♂️