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

How would i get this fly script to point the say way as the players char??

Asked by 4 years ago
Edited 4 years ago

I've tried to shift lock the script and stuff but it's not working.. i just want to the player to joint the say was as the camera

repeat wait() until game.Players.LocalPlayer.Character

local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local Torso = char:WaitForChild("Torso")
local Mouse = plr:GetMouse()
local toggle = false

Mouse.KeyDown:Connect(function(key)
    if key == "f" then
        if toggle == false then
            toggle = true
            local Anim = Instance.new("Animation")
            Anim.AnimationId = "rbxassetid://2426232664"
            local PlayAnim = hum:LoadAnimation(Anim)
            PlayAnim:Play()
            local BV = Instance.new("BodyVelocity",Torso)
            BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
            while toggle == true do
                BV.Velocity = Mouse.Hit.lookVector*100
                wait()
            end
        end
        if toggle == true then
            toggle = false
            Torso:FindFirstChildOfClass("BodyVelocity"):remove()
            local tracks = hum:GetPlayingAnimationTracks()
            for i, stoptracks in pairs(tracks) do
                stoptracks:Stop()
            end
            local Anim = Instance.new("Animation")
            Anim.AnimationId = "http://www.roblox.com/asset/?id=507767968"
            local PlayAnim = hum:LoadAnimation(Anim)
            PlayAnim:Play()
        end
    end
end)

0
This script is deprecated. Penomecco 9 — 4y
0
wdym? Deinonychusaurus 21 — 4y

Answer this question