Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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. :)

This discussion is preserved as it was. New answers, comments, and votes are closed.