Okay, I have a tool to fly.
It's a basic concept. Click and hold to use speed, move your mouse to set the looking position of your character.
This is my script, but the mouse.Hit isn't doing anything good for me...
player = game.Players.LocalPlayer
mouse = player:GetMouse()
script.Parent.Equipped:connect(function()
local gyro = Instance.new("BodyGyro", player.Character.Torso)
local move = Instance.new("BodyVelocity", player.Character.Torso)
move.MaxForce = Vector3.new(math.huge, 0, math.huge)
gyro.MaxTorque = Vector3.new(0,0,0)
mouse.Button1Down:connect(function()
gyro.cframe = (mouse.Hit)
move.velocity = (player.Character.Torso.CFrame.lookVector*30)
gyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
end)
mouse.Button1Up:connect(function()
move.velocity = (player.Character.Torso.CFrame.lookVector*0)
end)
end)
script.Parent.Unequipped:connect(function()
player.Character.Torso.BodyVelocity:Destroy()
end)
Please help someon! |