1 | function Clicked() |
2 | script.Parent.Parent.CFrame = CFrame.new(- 44.4 , 5.39 , 2 ) *CFrame.Angles(script.Parent.CFrame.r+Vector 3. new( 3 , 3 , 3 ) |
3 | end |
4 | script.Parent.ClickDetector.Clicked:connect(Clicked) |
The 'end' part is apparently wrong.
There is a missing bracket. Also the event is wrong. Fixed:
1 | function Clicked() |
2 | script.Parent.Parent.CFrame = script.Parent.Parent.CFrame *CFrame.Angles(math.rad( 3 ), math.rad( 3 ), math.rad( 3 )) |
3 | end |
4 | script.Parent.ClickDetector.MouseClick:connect(Clicked) |
Edit: Fixed up your CFrame stuff too.
Edit2: Ugh, I guess Angles doesn't approove Vector3's.
1 | function Clicked() |
2 | script.Parent.Parent.CFrame = CFrame.new(- 44.4 , 5.39 , 2 ) *CFrame.Angles(script.Parent.CFrame.r+Vector 3. new( 3 , 3 , 3 )) |
3 | end |
4 | script.Parent.ClickDetector.MouseClick:connect(Clicked) |
The end wasn't wrong, you were just missing a parenthesis.