Why is this frame rate dependent?
Connection = RS.Stepped:Connect(function(dt)
local Checker = Goal_Rotation +Inc/10 * dt
if Checker<min_Angle or Checker>max_Angle then
return
end
Goal_Rotation=Checker
local To_CFrame = Base_CFrame*CFrame.Angles(0,math.rad(Goal_Rotation),0)
Turret_Model:PivotTo(To_CFrame)
end)
This is server sided, the client only sends 1 or -1 or 0 for direction and it’s saved in Inc
variable
gyazo.com/b4d5b4cdeb3c11c8153e81dfea324e6d?token=357dc7af2aa7c864308970ea118ae935
1 Like
EtNowis
(EtNowis)
March 2, 2025, 1:01pm
2
i dont think it is. but you may try Heartbeat on server rather than RenderStepped if it is what RS mean
if you print(dt) does the value make sense?
1 Like
igd3v
(ItsGitto)
March 2, 2025, 3:14pm
3
Stepped returns 2 values, time elapsed and delta.
If you want to use Stepped, change this line to this
Connection = RS.Stepped:Connect(function(tElap, dt)
But i’d rather just use Heartbeat (server and client) / RenderStepped (if on client)
1 Like
igd3v
(ItsGitto)
March 2, 2025, 3:16pm
4
If you want it to not be frame dependent, use Heartbeat. It caps to 60f so it cannot be modified by the client.
1 Like
sinanxd2
(Fisher)
March 2, 2025, 3:59pm
5
you basically own the server on roblox studio