My on-click door script won't stay in place. Every time I click on it, it goes on the top of the building. Here's the script I used:
local open = false;
script.Name = "Clickable Door Script"; -- On the assumption that this is that script
script.Parent.ClickDetector.MouseClick:connect(function()
if not open then -- Checks if closed
script.Parent.Rotation = Vector3.new(0, 110, 0);
open = true;
else -- If open
script.Parent.Rotation = Vector3.new(0, 0, 0);
open = false;
end
end)
I was then told to use the script below, but every time I run it, the output box says, "12:56:47.119 - Workspace.Door.Clickable Door Script:9: bad argument #3 to 'Rotation' (Vector3 expected, got userdata)"
local open = false; -- so glad you declare variables efficiently
script.Name = "Clickable Door Script"; -- On the assumption that this is that script
script.Parent.ClickDetector.MouseClick:connect(function()
if not open then -- Checks if closed
script.Parent.Rotation = CFrame.Angles (0, 110, 0);
open = true;
else -- If open
script.Parent.Rotation = CFrame.Angles (0, 0, 0);
open = false;
end
end)

4 comments
It's still like messed up. Can I party you and have you come to my place so you can help me?
Did you edit it yet?
I guess this should do.
Thanks! It worked :)