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

Position is not a valid member of BodyVelocity HELP??!

the script im using has an error and i dont know how to fix it :(

the script:

local remote = script.Parent
local firstmvDb = false
remote.OnServerEvent:Connect(function(Player,Action)
	
	local char = Player.Character
	local hum = char:WaitForChild("Humanoid")
	local humrp = char:WaitForChild("HumanoidRootPart")
	
	
	local Anims = script:WaitForChild("Anims")
	local Sounds = script:WaitForChild("Sounds")
	local FX = script:WaitForChild("FX")
	
	local Incoming = hum:LoadAnimation(Anims:WaitForChild("RaiselKick"))
	local HitKick = hum:LoadAnimation(Anims:WaitForChild("HitKick"))
	
	if Action == "FirstMove" then
		if firstmvDb == false then
		print("ACCION EJECUTADA")
			firstmvDb = true
			delay(4,function()
				firstmvDb = false
			end)
			Incoming:Play()
			
			local Pos = humrp.CFrame * CFrame.new(0,40,0)
			local BP = Instance.new("BodyVelocity",humrp)
			BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
			BP.Position = Pos.p
			BP.D = 10
			BP.P = 50
			game.Debris:AddItem(BP,1)
		end
	end
end)

3 comments

0

Can you post the script so we can see what's wrong with it?

0

already posted it in the answers

0

Don't post it as an answer. Instead, edit your question. Position is not a property of a bodyvelocity, but we don't know what exactly you want to achieve with this, do you want to fling the player upwards? Also, don't use the 2nd parameter of Instance.new and instead parent the object after setting its properties. There is a PSA regarding this

1 answer

Body velocity does not have a position attribute. You're probably confusing it with the "BodyPosition".

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