-
What do i want to achieve?
I want the paper to get tweened above the paper before it, basically forming a stack of papers -
What is the issue?
Paper is getting tweened incorrectly and not getting tweened above the paper before it, basically not forming a stack. -
What solutions have i tried so far?
I’m not very educated with weld positioning but tried all i can, so i decided to just create a topic for support and after the resolving of the issue, i might learn a thing or 2 about weld positioning. -
Video/Image - To resolve issue
What i want to achieve =
Video footage of the issue = robloxapp-20230919-2212265.wmv (1.5 MB)
- Lua Block:
Paper.Anchored = false
local Weld = Instance.new("Weld", Paper)
Weld.Part0 = Paper
Weld.Part1 = plr.Character:WaitForChild("HumanoidRootPart")
Weld.C0 = v.PrimaryPart.CFrame
Weld.C1 = v.PrimaryPart.CFrame
if CurrentPages < 2 then
local Tween = TweenService:Create(Weld, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {C0 = CFrame.new(centerPos)}):Play()
local Tween1 = TweenService:Create(Weld, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {C1 = CFrame.new(centerPos + Vector3.new(0,0, -2))}):Play()
else
print("Paper"..CurrentPages - 1)
if plr.Character:FindFirstChild("Humanoid").MoveDirection.Magnitude < 0 then continue end
local Tween = TweenService:Create(Weld, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {C0 = CFrame.new(plr.Character:FindFirstChild("Paper"..CurrentPages - 1).Position + Vector3.new(0, Paper.Size, 0))}):Play()
local Tween1 = TweenService:Create(Weld, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {C1 = CFrame.new(centerPos + Vector3.new(0,plr.Character:FindFirstChild("Paper"..CurrentPages - 1).Position + Vector3.new(0, Paper.Size.Y, 0), -2))}):Play()
end