Changed is Not a Valid Member of Vector3

Hi guys,

Basically I want to check if a Vector3 changes, but it seems that I cannot used .Changed.

Is there another way for me to check for a changed? I have tried look around but I haven’t been able to find anything for a while.

You can use this:

1 Like

image

Can I see your script? What Vector3 are you trying to check for (position, orientation etc.) Once I know that I can show you how to use it.

1 Like

Vector3 doesn’t have an event or properties to check if it changed. Are you trying to check if the property that is a Vector3 changes?

1 Like

Well the system is actually quiet complicated and you would better off looking at the scripts here.

@Quwanterz
That said, I am using Gravity Controller, which uses a Vector3 value in order to control Gravity.

I basically just want to check if that value changes, then run my function based off of that.

Pretty sure roblox does not provide you a way of checking if a vector3 is changed. I would probably make a Vector3Value and then use the .Changed on it.

local Vector3Value = Vector3.new(0,0,0)

local Value = Instance.new("Vector3Value",workspace)
Value.Value = Vector3Value

Value.Changed:Connect(function()
	print("The vector3 has been changed")
end)
1 Like

If it’s an InstanceValue, then you can use the Changed event. Vector3Value | Documentation - Roblox Creator Hub

1 Like

Thank you for suggesting a Vector3Value because it actually gave me this idea somehow:

	if (gravityUp-Vector3.new(0, 1, 0)).Magnitude > .1 then

I realized that I would just be able to do a magnitude check between two Vector3 values, which was basically what I wanted to check for within the Changed function.

1 Like

That is incorrect. Vector3 is not a instance, it’s a positional data type.

No I mean that if he is looking for when the size or the position of a part is changed he could use that. Unless that isn’t what he’s looking for?

No I just wanted to check if the Vector3 value itself changed.

But I already figured out the solution.