Vector3 Script Problem

Hi, I need your help! I can’t make a script :confused: Here’s what I want:
If the part has an orientation smaller than 90, then its orientation will be 0! I tried to make this script but it doesn’t work:

if game.Parent.Orientation <= Vector3.new(0,90,0) then
script.Parent.Orientation = Vector3.new(0,0,0)
end
1 Like

That isn’t a part. You are referencing the parent of the game. Reference the script’s parent.

it was an example but otherwise in the original script I put it right!

1 Like

You are refencing game’s Parent.

I think you meant game.Part or something.

it was an example but otherwise in the original script I put it right!!!

if script.Parent.Orientation <= Vector3.new(0,90,0) then

Becomes

if script.Parent.Orientation.Y <= 90 then

Not sure if this would fix it

2 Likes