✓ Accepted answer
There's no code here so I can't revise it for you, however, considering you're using a tween, when you created the tween, it has a set goal position, when you jump, you've raised your y-axis by a set amount, which the tween is trying to compensate for.
Considering this, I would advise you to create two tweens, then have an if-then clause to check if the player is jumping, if they are, then the second tween should be played, else, the first tween.
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1)
local player = game.Players.LocalPlayer
local y = player.Character.HumanoidRootPart.Position.Y
local goal1 = {}
local goal2 = {}
goal1.CFrame = player.Character.HumanoidRootPart.CFrame + Vector3.new(30, 0, 0)
goal2.CFrame = player.Character.HumanoidRootPart.CFrame + Vector3.new(30, -y, 0)
local center = player.Character.HumanoidRootPart
local tween1 = TweenService:Create(center, tweenInfo, goal1)
local tween2 = TweenService:Create(center, tweenInfo, goal2)
function Activate()
if player.Character.Humanoid.Jump = false then
tween1:Play()
elseif player.Character.Humanoid.Jump = true then
tween2:Play()
end
wait(1)
end
Event:Connect(Activate)
This is an example script
1 comment
Thank you, ill try doing that when i can get on my pc <3