function Clicked()
script.Parent.Parent.CFrame = CFrame.new(-44.4, 5.39,2) *CFrame.Angles(script.Parent.CFrame.r+Vector3.new(3,3,3)
end
script.Parent.ClickDetector.Clicked:connect(Clicked)
The 'end' part is apparently wrong.
function Clicked()
script.Parent.Parent.CFrame = CFrame.new(-44.4, 5.39,2) *CFrame.Angles(script.Parent.CFrame.r+Vector3.new(3,3,3)
end
script.Parent.ClickDetector.Clicked:connect(Clicked)
The 'end' part is apparently wrong.
There is a missing bracket. Also the event is wrong. Fixed:
function Clicked()
script.Parent.Parent.CFrame = script.Parent.Parent.CFrame *CFrame.Angles(math.rad(3), math.rad(3), math.rad(3))
end
script.Parent.ClickDetector.MouseClick:connect(Clicked)
Edit: Fixed up your CFrame stuff too.
Edit2: Ugh, I guess Angles doesn't approove Vector3's.
function Clicked()
script.Parent.Parent.CFrame = CFrame.new(-44.4, 5.39,2) *CFrame.Angles(script.Parent.CFrame.r+Vector3.new(3,3,3))
end
script.Parent.ClickDetector.MouseClick:connect(Clicked)
The end wasn't wrong, you were just missing a parenthesis.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
It says 'r' isn't valid.
Fixed up your CFrame stuff too.
It's still not working! It says in output: Workspace.Part.Part.Script:31: bad argument #3 to 'Angles' (number expected, got no value)
Edit2: Ugh, I guess Angles doesn't approove Vector3's.