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

Help, Value is not a valid member of Position?

Asked by
Nidoxs 190
10 years ago
local Pos = script.Parent.Position.Value 
wait(2) 
E = Instance.new("Explosion", script.Parent) 
E.BlastRadius = 190 
E.BlastPressure = 50000 
E.DestroyJointRadiusPercent = 100 
E.Position = Vector3.new(Pos)

This makes perfect sense to me. :( Help please?

1 answer

Log in to vote
3
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago
local Pos = script.Parent.Position.Value 

If script.Parent is some brick, then script.Parent.Position is the Brick's position -- a Vector3. Vector3's don't have a Value property (member) so you're getting this error.

Most likely you just want

local Pos = script.Parent.Position

If, however, Position is actually a Vector3Value that you are using -- the reason for the error is stil the above. It will prefer the Position property over the child named "Position". You could fix this by using :FindFirstChild("Position").Value or, better, by renaming the Vector3Value.

0
Thanks alot! :) Nidoxs 190 — 10y
Ad

Answer this question