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

Cframe Is Not Member of Part In Dash Script? Help?

Asked by 5 years ago

script:

local plr = game.Players.LocalPlayer
local Char = plr.character or plr.CharacterAdded:Wait()
local UserInputService = game:GetService("UserInputService")

local Tapped = false
local Time = 0.25

UserInputService.InputBegan:Connect(function(Input, GameStuff)
    if GameStuff then return end
    if Input.KeyCode == Enum.KeyCode.W then
        if not Tapped then
            Tapped = true
            wait(Time)
            Tapped = false
        else
            Char.HumanoidRootPart.Velocity = Char.HumanoidRootPart.Cframe.lookVector*400

        end
    end
end)

it is a dash script (Yes i am getting int advanced scripting) im not very good at scripting Right Now

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

Well you simply just spelled Cframe wrong ;-; ... It's 'CFrame' not 'Cframe'.

But I wouldn't use velocity. I would use BodyVelocity below


local var = Instance.new("BodyVelocity") var.MaxForce = Vector3.new(math.huge, 1000, math.huge) var.Velocity = Char.HumanoidRootPart.CFrame.lookVector* 50 var.Parent = Char.HumanoidRootPart wait(.5) var:Destroy()

You can adjust the Vector3 numbers for the distance and the "Wait" for how long it will be pushing you until it's destroyed.

-Please mark this as answered if it helped you. :)

Ad

Answer this question