local RunService = game:GetService("RunService") local player = game.Players.LocalPlayer local sinWaveNum = 0 RunService.Heartbeat:connect(function() sinWaveNum = sinWaveNum + .01 Boats[player.Name]:SetPrimaryPartCFrame(Boats[player.Name].Center.CFrame* CFrame.new(.025,0,0)):toWorldSpace(CFrame.new(0,0,0))* CFrame.Angles(math.cos(sinWaveNum)/800,0,-math.cos(sinWaveNum)/1000) end)
Keep this in mind: all of the parts in the 'boat' are anchored and are welded to 1 center piece in the boat model that's also anchored.
I'm trying to make my boat move upon heartbeat but my sinWave function when applied slowly yet surely makes the boat 'crack'. All boat parts stay together, but it just slowly splits apart for some reason. Any ideas on how to fix this?
And if you're wondering, this is how I welded all parts to my boat's center:
local function Weld(p1, p2) --p1 = center piece, p2 = boat part local w = Instance.new("Weld", p1) w.Part0 = p1 w.Part1 = p2 w.C1 = p2.CFrame:toObjectSpace(p1.CFrame) end
From what I know, it looks like you didn't weld your boat. It's kinda like when you sit down on the boat it welds the Character to the seat.
Basically you would need to weld every part together, I suggest using a loop. If your lazy there is a welding script called qPerfectionWeld which welds everything together.
Basically weld it.
Hopefully this helped
Okay, welding. You can weld with the constraints too. But, in ROBLOX, welding is typically gluing un-anchored parts together. But, when you move any parts that has a weld, it breaks because its position has changed. So, you're gonna need to re-weld it, or anchor it and weld.