local Platform = script.Parent.Movement
local Rotor = script.Parent.Rotor
local seat = script.Parent.VehicleSeat
seat.ChildAdded:connect(function(object) -- Seat Client Add
if object:IsA("Weld") and object.Name == "SeatWeld" then
local player = game.Players:GetPlayerFromCharacter(object.Part1.Parent)
local clientScript = script.Client:clone()
clientScript.Parent = player.PlayerGui
seat.ChildRemoved:connect(function(object) -- Seat Client Remove
clientScript:Destroy()
end)
end
end)
game:GetService("RunService").Stepped:connect(function()
if seat.Throttle == 1 then -- Down
Rotor.Weld.C0 = Rotor.Weld.C0 * CFrame.fromEulerAnglesXYZ(math.rad(-0.6),0,0)
elseif seat.Throttle == -1 then -- Up
Rotor.Weld.C0 = Rotor.Weld.C0 * CFrame.fromEulerAnglesXYZ(math.rad(0.6),0,0)
end
if seat.Steer == 1 then -- Right
Platform.Weld.C0 = Platform.Weld.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(-0.6),0)
elseif seat.Steer == -1 then -- Left
Platform.Weld.C0 = Platform.Weld.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(0.6), 0)
end
end)
i need help adding limits on up and down rotation.
i dont know how to do it