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)


