Hey everyone, this is my first topic! Excited to be in this community.
I’ve been on quite the pickle lately, as I’m currently developing a project with multiple obstacle courses throughout. The thing is, one of said obstacles isn’t really working very well.
I’m trying to implement moving platforms to give players a new facet of danger, yet the script I wrote (CFrame based) doesn’t center my characters movement around the platform’s, which means I get flinged off every time I try to stand on the thing.
How would I be able to construct a physics-based platform so the character’s movement can stay relative to the platforms? Here’s my current script:
local ts = game:GetService("TweenService")
local sp = script.Parent
local info = TweenInfo.new(
2, -- Duration
Enum.EasingStyle.Quad,
Enum.EasingDirection.InOut,
math.huge, -- Times Repeated
true, -- Reverse?
0 -- Delay
)
local pos =
{
CFrame = sp.CFrame - Vector3.new(23,0,0)
}
local movement = ts:Create(sp,info,pos)
movement:Play()