Since I started to make a sinking ship game, it seems that SetPrimaryPartCFrame don’t move the player as the model move. I want to make the player move as the ship move…
Without the player:
With the player:
I tried to use MoveTo()… but it didn’t worked. I’ve looked around on Roblox Wiki, DevForum, and searched any video, but they are a bit hard to understand to me.
-- Variables
local Titanic = workspace.Titanic -- Ship
local MainPart = Titanic.Main -- The Ship's PrimaryPart
local Detector = workspace.IcebergVisiblerDetection -- The part that finishes the first moving action
Titanic.PrimaryPart = MainPart
-- Main
while wait(5) do
while true do
Titanic:SetPrimaryPartCFrame(Titanic:GetPrimaryPartCFrame() * CFrame.new(0, 0, -0.5))
wait(0.0001)
if Titanic.PrimaryPart.CFrame == Detector.CFrame then
print('Breaking Loop...')
break
end
end
end
Hey, so, you’re just setting the primary part CFrame of an object, which, doesn’t means the player will move with it, there are some open sources trains, you can take a look and see if it helps out
I don’t recommend you doing this, because, it will glitch, second, if a player dies, they wouldn’t respawn inside of the model, and the player movement would be kinda weird.