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

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

Asked by 6 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 3761 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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

0
why a thank you Minecraftdiomond727 -5 — 6y
Ad
Log in to vote
0
Answered by
hellmatic 1523 Moderation Voter
6 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 — 6y

Answer this question