Part not rotating the way its supposed to

I’m currently stuck wondering why the rotation doesn’t change to the rotation I want it to? Is there any way I could fix this?

Not supposed to look like:

Supposed to look like:

Code:

-- Locals

local Key = script.Parent.Parent.KeyFob

local Light = script.Parent.Parent.Light

local ClickDetector = script.Parent.ClickDetector

local Sound = script.Parent.Sound

-- Main

function mouseClick()

Sound:Play()

Key.Rotation = Vector3.new(-90, 0, 0)

Light.BrickColor = BrickColor.new("Lime green")

end

ClickDetector.MouseClick:connect(mouseClick)

ClickDetector.RightMouseClick:Connect(function()

Sound:Play()

Key.Rotation = Vector3.new(-90, 90, 0)

Light.BrickColor = BrickColor.new("Bright red")

end)
1 Like

You could try playing around with the anchor point?

You have the wrong axis’. Copy and paste the orientation property of the fixed rotation and paste it into the Vector3

I already did
image