Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Why wont my plane fly? [closed]

Asked by
NotSoNorm 777 Moderation Voter
10 years ago

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)
0
Output? RM0d 305 — 10y
0
GetMouse is not a valid member of DataModel and Humanoid is not a valid member of Script NotSoNorm 777 — 10y
0
You can only get the mouse from a local script. Perci1 4988 — 10y
0
Thanks! NotSoNorm 777 — 10y

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?