How do I move an entire model very smoothly without using roblox physics, or the heartbeat/runservice service?
I have tried to make a boat move using cframe for my game, I was currently using the heartbeat service for this but later found out that when multiple people join with their each assigned boat it uses a massive amount of the “Recv” data resource from the server to the client. This huge amount of usage causes it to be very laggy on low end devices and even causes my high end computer with very low ping to recieve very choppy gameplay.
Obviously the heartbeat service causes way too much lag as each boat spawned uses around 90kb/s of the “Recv” data resource. And by the end of the games development there will be up to 100 boats spawned in each server.
Here is the part of the script that controls the movement CFrame of the boat:
Running = game:GetService("RunService").Heartbeat:Connect(function(dt)
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.new(0,1 * ((101.15 + ((Health.Value / MaxHealth.Value) * 2)) - Model.PrimaryPart.Position.Y) * dt, -1 * (Speed.Value * 1.1) * dt)) -- move forwards and set Y level
if GoRight == true then
if Model.PrimaryPart.Orientation.Z >= -20 then
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.Angles(1 * (0 - Model.PrimaryPart.Orientation.X) * dt, 0, math.rad((-1 * turnspeed * dt) * 0.7))) -- move vanity rotation
end
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.Angles(1 * (0 - Model.PrimaryPart.Orientation.X) * dt, math.rad(-1 * turnspeed * dt), 0)) -- move boat rotation
else
if GoLeft == true then
if Model.PrimaryPart.Orientation.Z <= 20 then
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.Angles(1 * (0 - Model.PrimaryPart.Orientation.X) * dt, 0, math.rad((1 * turnspeed * dt) * 0.7))) -- move vanity rotation
end
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.Angles(1 * (0 - Model.PrimaryPart.Orientation.X) * dt, math.rad(1 * turnspeed * dt), 0)) -- move boat rotation
else
if Model.PrimaryPart.Orientation.Z < 0 then
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.Angles(1 * (0 - Model.PrimaryPart.Orientation.X) * dt, 0, math.rad((1 * turnspeed * dt) * 0.7))) -- move straight rotation
end
if Model.PrimaryPart.Orientation.Z > 0 then
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame * CFrame.Angles(1 * (0 - Model.PrimaryPart.Orientation.X) * dt, 0, math.rad((-1 * turnspeed * dt) * 0.7))) -- move straight rotation
end
end
end
end)
I’m just wondering if theres any ways to do this a lot more efficiently with very smooth movement (atleast 60fps)
I’ve tried using the tweenservice and it’s probably the way to go but I just don’t have enough knowledge with tweenservice.
But if anybody knows how to move my models CFrames while using Tweenservice or something else smooth then I would heavily appreciate it if you could tell me how.