I do not know the issue. But whenever the BP is used it just positions me to somewhere random? Its supposed to be a jump, and holds the player in air while a projectile fires. (A jump kind of effect into the air) I don't know the problem, but I have attached my script to this thread. Please help!
-- Variables
local UIS = game:GetService("UserInputService")
local Cam = script:WaitForChild("CamShake")
local ButtonEvent = script:WaitForChild("BtnDown")
local plr = game.Players.LocalPlayer
local Mouse = plr:GetMouse()
local Debounce = true
local BtnDown = false
Player = game.Players.LocalPlayer
Char = Player.Character
--- Functions:
local Tool = script.Parent
Tool.Equipped:Connect(function()
Tool.Equip.Value = true
end)
Tool.Unequipped:Connect(function()
Tool.Equip.Value = false
end)
--- Keybind
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Z and Debounce == true then
Debounce = false --and Tool.Equip.Value == true and Tool.Active.Value == "None" then
BtnDown = true
--Tool.Active.Value = "WindSlam"
local Charge = 0
script.Function:FireServer(Mouse.Hit.p)
local BG = Instance.new("BodyGyro")
BG.Parent = Char.HumanoidRootPart
BG.MaxTorque = Vector3.new(250000,250000,250000)
BG.CFrame = CFrame.new(Char.HumanoidRootPart.Position, Mouse.Hit.p)
BG.P = 25000
BG.D = 140
local BP = Instance.new("BodyPosition")
BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BP.P = 15000
BP.D = 1250
BP.Position = Char.HumanoidRootPart.Position
BP.Parent = Char.HumanoidRootPart
while BtnDown == true and Charge < 40 do
BG.CFrame = CFrame.new(Char.HumanoidRootPart.Position, Mouse.Hit.p)
Charge = Charge + 1
wait()
end
BG:Destroy()
BP:Destroy()
ButtonEvent:FireServer()
end
end)
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Z and Tool.Equip.Value == true and Tool.Active.Value == "None" then
BtnDown = false
Tool.Active.Value = "WindSlam"
wait(1.5)
Tool.Active.Value = "None"
wait(3)
Debounce = true
end
end)
-- Camera Shake
function cameraShake()
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
for i = 1, 40 do
local a = math.random(-100, 100)/100
local b = math.random(-50, 50)/100
local c = math.random(-100, 100)/100
Humanoid.CameraOffset = Vector3.new(a,b,c)
wait()
end
Humanoid.CameraOffset = Vector3.new(0,0,0)
end
Cam.OnClientEvent:Connect(function()
cameraShake()
end)

2 comments
do you need to teleport or take a player somewhere?
I was unable to replicate the issue (I was seizuring in place instead). Could something else be affecting the position of the player?