04:01:16.784 Attempt to connect failed: Passed value is not a function - Studio
04:01:16.784 Stack Begin - Studio
04:01:16.785 Script 'Workspace.Raft.VehicleSeat.Propel', Line 42 - Studio - Propel:42
04:01:16.785 Stack End - Studio
--\\ Vehicle Scrupt //--
local Seat = script.Parent
local Base = script.Parent.Parent:FindFirstChild("Base")
local Linear = Base.AssemblyLinearVelocity
local Angular = Base.AssemblyAngularVelocity
function Up()
if Seat.Throttle ~= -1 or 0 then
Linear = (Base.CFrame.LookVector * 100)
end
end
function Down()
if Seat.Throttle ~= 1 or 0 then
Linear = (-Base.CFrame.LookVector * 100)
end
end
function SteerRight()
end
function SteerLeft()
end
function checkThrottle()
if Seat.Throttle == 1 then
Up()
elseif Seat.Throttle == -1 then
Down()
end
end
function checkSteer()
if Seat.Steer == 1 then
SteerRight()
elseif Seat.Steer == -1 then
SteerLeft()
end
end
Seat:GetPropertyChangedSignal("Steer"):Connect(checkSteer())
Seat:GetPropertyChangedSignal("Throttle"):Connect(checkThrottle())