#making flying player command

1 messages · Page 1 of 1 (latest)

native hatch
#

ive been looking for a way to make a ;fly command, i know common admin system script have them, but id like to make one myself. It just personal project.

Ive tried using tutorial and googled them, but everytime i search up for it, its either a weird "hack" for roblox or scripting for when palying game or something, i dont know much i just close the tab before reading more of it

I tried using AlignOrientation and LinearVelocity, since the tutorial i watch was using BodyGyro and something else that is depricated (i forgot what its called)
Linear velocity changed but the character just in the ground, doign nothing
The tutorial is using localscript for making both of them and uses UserInput to change its velocity

Then i tried just change the CFrame of HumanoidRootPart, but as if nothing was changed, i just walk normaly

Theres 2 question i like to ask too

  1. Is it because i changed the CFrame and making AlignOrientation and LinearVelocity locally ?
  2. is the solution is just making either of the thing i tried on server and have remote event getting player input?

Thanks in advance

vale saddle
#

maybe this will work

#

game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if string.lower(msg) == ";fly" then
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")

        if hrp:FindFirstChild("FlyForce") then
            hrp.FlyForce:Destroy()
        end

        local force = Instance.new("BodyForce")
        force.Name = "FlyForce"
        force.Parent = hrp
        force.Force = Vector3.new(0, hrp:GetMass() * workspace.Gravity, 0)

        local bv = Instance.new("BodyVelocity")
        bv.Name = "FlyVelocity"
        bv.MaxForce = Vector3.new(1e6, 1e6, 1e6)
        bv.Parent = hrp

        local mouse = player:GetMouse()

        while force.Parent == hrp do
            bv.Velocity = mouse.Hit.LookVector * 60
            task.wait()
        end
    end
end)

end)

rustic orbit
#

@native hatch

#

This is the configuration of the respective body movers

native hatch
#

Ill give both suggestion a try, thank you for the help

native hatch
native hatch
#

I tried with and without disabling Running, both ended with same result, no flying happening

#

Okay... i found the issue

Somehow the attachment didnt get put, i porbably miss type something

Sorry for that

native hatch
# opal glen code

i typod the attachment name, but other than that im taking inspiration from Ziffix code

#

its the same idea with the old BodyGyro one

tiny prism