Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How do I put in the p property in my BodyPosition script?

Asked by 2 years ago

function onTouched(hit) local h = hit.Parent:findFirstChild("Humanoid") if h ~= nil then local b = Instance.new("BodyPosition") b.position = script.Parent.PointA.Position b.p = 10 b.maxForce = Vector3.new(500000000, 500000000, 500000000) b.Parent = hit.Parent.Torso wait(3) b.Parent = nil end end script.Parent.Touched:connect(onTouched)

This is what I have so far and i'm really confused why the console says "p is not a valid member of 'BodyPosition'". Can someone help?

0
What are you talking about? And please format your code correctly using the Lua logo over the question box. DeceptiveCaster 2796 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago

Use a capital "P" instead of a lowercawse "p".

0
why a thank you Minecraftdiomond727 -5 — 2y
Ad
Log in to vote
0
Answered by
hellmatic 1502 Moderation Voter
2 years ago

Make sure P's value is high. If it's too low, it will show little to no effect.

0
a thank you Minecraftdiomond727 -5 — 2y

Answer this question