When I try assign a variable to a RBXScriptConnection, the variable for some reason isn’t actually a connection, but it’s a service or an event.
Script:
local function updateForce(dt)
Gear.Propeller.ForcePart.BodyForce.Force = Gear.Propeller.ForcePart.CFrame:VectorToWorldSpace(Vector3.FromNormalId(Enum.NormalId.Front) * -15000)
end
connection = game:GetService("RunService").Heartbeat:Connect(updateForce)
and here I check if the connection is a connection, and disconnect if it is:
if typeof(connection) == "RBXScriptConnection" then
connection:Disconnect()
end
I know connection is a reference to RunService because of this:
https://gyazo.com/8d88cd85feaaa1bfec87955d622bca4d
If you can help, please reply to this topic.
Thx