After looking a bit on the forum, I’ve seen people with this problem too, but I didn’t really find an answer.
I am trying to learn Roblox Lua, and I will make a simple little obby as a starting point. I tried firstly making a moving platform, before, I was using while true do and Vector3, then someone recommended TweenService, I learned a bit of it, and it worked. However, the player is not standing on the platform. Here’s the code (it’s a Tween that I will be modifying the partProperties according to the platform’s position):
local tweenService = game:GetService("TweenService")
local part = script.Parent
local tweeningInfo = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
-1,
true,
0
)
local partProperties = {
Position = Vector3.new(24, 3.5, -3); --The platform's position is 4, 3.5, -3
}
local Tween = tweenService:Create(part, tweeningInfo, partProperties)
Tween:Play()
It works as it should work. It moves. But the player does not follow it. How can I fix this?