-
What do I want to achieve?
To fix welds not positioning on the Y Axis when using TweenService -
What is the issue?
Welds not positioning on the Y Axis when using TweenService -
What solutions have i tried so far?
Looked all over the DevForum and out of ideas on what to do so i decided to make a post on DevForum
print("Paper"..CurrentPages - 1)
if plr.Character:FindFirstChild("Humanoid").MoveDirection.Magnitude < 0 then Paper:Destroy() continue end
Paper.CanCollide = false
local offset = Vector3.new(0, 2, 0) -- Adjust the vertical offset as needed
local originalC0 = plr.Character:FindFirstChild("Paper"..CurrentPages - 1).Weld.C0
local originalC1 = plr.Character:FindFirstChild("Paper"..CurrentPages - 1).Weld.C1
local newC0 = originalC0 + offset
local newC1 = originalC1 + offset
local Tween = TweenService:Create(Weld, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {C0 = newC0}):Play()
local Tween1 = TweenService:Create(Weld, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {C1 = newC1}):Play()
wait(.5)
print(newC0)
print("RAN TWEEN")
print("Paper"..CurrentPages.." POSITION: ",plr.Character:FindFirstChild("Paper"..CurrentPages - 1).Position, "CURRENTPAGE POSITION: ", Paper.Position)
print("PART 0: ", Paper.Weld.Part0, "PART 1:", Paper.Weld.Part1)