one = script.Parent.Parent.Part two = script.Parent.Parent.Part2 thr = script.Parent.Parent.Part3 cd = cd.script.ClickDetector cd.MouseClick:connect(function() one.Position = Vector3.new(66.9, 1.2, -15.6) two.Position = Vector3.new(66.9, 1.2, -15.6) thr.Position = Vector3.new(66.9, 1.2, -15.6) wait(.025) one.Position = Vector3.new(66.9, 1.3, -15.6) two.Position = Vector3.new(66.9, 1.3, -15.6) thr.Position = Vector3.new(66.9, 1.3, -15.6) wait(.025) one.Rotation = Vector3.new(2,15,10) two.Rotation = Vector3.new(8,13,29) thr.Rotation = Vector3.new(20,8,9) wait(.025) end)
The three blocks and button are in a model that is inside of another model. That's why I have Parent twice at the top of the script. Whenever I click the button, nothing happens. There is a click detector inside of the button block. Also, the real thing is 155 lines. I took out most of it so it would fit here with reasonable size. The three blocks move up like 130 times, then they all spin. The same script (but with only one block moving) works fine. There's just something wrong with this one. Can three blocks within the same function move at the same time? Or should I make three different functions of the three different blocks.
Line 6,
cd.MouseButton1Click:connect(function()
This isn't a gui, Roboy5857.
Your problem, Lightdrago, was that rotation increments has to be in radians.. You can perform this by using the math.rad method on any number; math.rad(num) or num:rad().
Here are two ways to fix your problem;
--Use CFrame to rotate.. one.CFrame = CFrame.new(one.Position)*CFrame.Angles(math.rad(2),math.rad(15),math.rad(10))
--Or just perform the radians method on the Rotation property.. one.Rotation = Vector3.new(math.rad(2),math.rad(15),math.rad(10)
I suggest the first one, so you can get used to rotating that way as it will come in handy for the knowlage of welds and further CFrame manipulation.
If you have any questions ask me..
Hope I helped
+1
Think you already found your answer, but remember, Vector3 = GUIS, CFrame = Parts
one = script.Parent.Parent.Part two = script.Parent.Parent.Part2 thr = script.Parent.Parent.Part3 cd = script.Parent.ClickDetector -- This was wrong.. This is now correct if the ClickDetector is located within the part. cd.MouseClick:connect(function() print("Clicked") one.Position = Vector3.new(66.9, 1.2, -15.6) two.Position = Vector3.new(66.9, 1.2, -15.6) thr.Position = Vector3.new(66.9, 1.2, -15.6) print("1") wait(.025) one.Position = Vector3.new(66.9, 1.3, -15.6) two.Position = Vector3.new(66.9, 1.3, -15.6) thr.Position = Vector3.new(66.9, 1.3, -15.6) print("2") wait(.025) one.Rotation = Vector3.new(2,15,10) two.Rotation = Vector3.new(8,13,29) thr.Rotation = Vector3.new(20,8,9) print("3") wait(.025) end)
I added some prints so you can see how it acts when you click it. (Or just incase something was wrong..)
Tbh, I don't really see how they missed line 4..