Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

why wont this script work?

local function upright()
    local seat = script.Parent.Parent.ca.Value 
    local bg = Instance.new("BodyGyro",seat) 
    bg.MaxForce = Vector3.new(4000000,4000000,4000000)
    bg.P = 3000
    game.Debris:AddItem(bg,3.5)
end

this car is in a flip button that is for a car. so basically i want this button to do is that if the car is upside down or flip over and when u press flip it will put the car on its wheels. even if the player is not in the car if u press flip the car should flip on its wheels if it is upside down. but this script doesnt do that.

1 answer

✓ Accepted answer

.. You're putting the bodygyro in a value? O3o Also MaxForce isn't a property of Bodygyro, It's MaxTorque. I think this would work

local function upright()
    local seat = script.Parent.Parent 
    local bg = Instance.new("BodyGyro",seat) 
    bg.MaxTorque = Vector3.new(4000000,4000000,4000000)
    bg.P = 3000
    game.Debris:AddItem(bg,3.5)
end

2 comments

0

ca may be an ObjectValue..

0

ca was object value. i forgot that it was a gui button so i forgot to add the mousebutton1click thing but ty for the maxtorque thing tho

This discussion is preserved as it was. New answers, comments, and votes are closed.