Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to rotate a part when clicked?

I am making a door that when you click it it will open and I am not sure how I would script it... This is what I tried but it didn't work... Sorry I am bad at scripting

local Part = script.Parent
local CD = Part.ClickDetector

CD.MouseClick:connect(function()
Part.Orientation = 40,0,0
end)

1 answer

✓ Accepted answer

You never used Vector3.new. This is required for an Orientation value.

local Part = script.Parent
	local CD = Part.ClickDetector
	 
	CD.MouseClick:connect(function()
	Part.Orientation = Vector3.new(40,0,0)
	end)

2 comments

0

Thanks!

0

Your welcome m8!

This discussion is preserved as it was. New answers, comments, and votes are closed.