I have this script inside a plane seat so when I press "a" it should raise the maxTorque, Whats wrong??
Player = script.Parent.Parent.Parent mouse = Player:GetMouse() function onSit(humanoid) function onKeyDown(key) key:lower() if key == "a" then script.Parent.BodyForce.maxTorque = '0,100000,0' function onKeyUp(key) key:lower() if key == "a" then script.Parent.BodyForce.maxTorque = '0,0,0' local m = Instance.new("BoolValue") m.Value = true function onChanged(human) if human.Sit == true and human.Jump == false then if m.Value == true then onSit(human) m.Value = false else m.Value = true end end end function onNew(player) player.Character.Humanoid.Changed:connect(function() onChanged(player.Character.Humanoid) end) end game.Players.PlayerAdded:connect(onNew) if game.Players.LocalPlayer ~= nil then player = game.Players.LocalPlayer player.Character.Humanoid.Changed:connect(function() onChanged(player.Character.Humanoid) end) end end end end end end mouse.KeyDown:connect(onKeyDown) mouse.KeyUp:connect(onKeyUp)
Locked by BlueTaslem
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?