Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 09:13 AM |
Can someone help me with a script..
All it needs to do is make a brick go in a big circle. - R$100 if you can add speed adjustment
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
|
| 19 Oct 2016 09:44 AM |
| What kind of circle? like just a pinning brick or what? |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2016 09:50 AM |
local brick = script.Parent local radius = 125 local speed = 0.2
while wait() do local x, y = math.cos(tick() * speed) * radius, math.sin(tick() * speed) * radius brick.CFrame = CFrame.new(x, y, 0) end |
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 10:02 AM |
@direMitten It works but it gose from up to down
I need it to go from left to right like clockwise...
Like if a blimp was going around a building.
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 19 Oct 2016 10:33 AM |
| Change around the x,y, and try affecting y,z or x,z to get your result |
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 01:04 PM |
tried that still didn't work.. just gose Up to down..
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
|
| 19 Oct 2016 01:16 PM |
learn about trigonometry or use cframe in a bad way
while wait() do workspace.Baseplate.CFrame = workspace.Baseplate.CFrame*CFrame.new(-10,0,0)*CFrame.Angles(0,math.rad(2),0)*CFrame.new(10,0,0) end
--or
local angle = 0 while wait() do workspace.Baseplate.CFrame = CFrame.new(math.cos(angle)*6,0,math.sin(angle)*6) angle = angle*2 end |
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 01:20 PM |
^ Cframe is hard to lean so please I really don't need you to criticize me.. And I do know Z, Y, Z It's just the script he give me thank you for that. The script just dose not use the Z axis
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 01:56 PM |
@Wunder_Wulfe Thank you so much.. But I have a new problem, I can't add bricks to the moving part.. It just stops. Plus all credit will go to you.
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 19 Oct 2016 02:33 PM |
local part = script.Parent local angle = 0
while wait() do angle = angle + .1 part.CFrame = CFrame.new(math.cos(angle),0,math.sin(angle)) end
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 02:37 PM |
^ Thanks but..
while wait() do workspace.Baseplate.CFrame = workspace.Baseplate.CFrame*CFrame.new(-10,0,0)*CFrame.Angles(0,math.rad(2),0)*CFrame.new(10,0,0) end
^ This script helps but I can't weld bricks/Parts onto the moving part.. If someone can help me with this will be a life saver..
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
| |
|
qqtt991
|
  |
| Joined: 14 Dec 2007 |
| Total Posts: 1387 |
|
|
| 19 Oct 2016 03:14 PM |
Oml. Try this script I have for this purpose.
Go into my models and look for something called Cframe spinning model or something like that. There's also a big propeller in there that uses the same script. Second or third page probably. Not sure what the link is and I can't check because I'm on mobile. Build your blimp and put it in a model, then put an anchored invisible brick where you want the center of rotation to be. Click on the model and change its primaryPart property to the invisible Center brick by clicking on it in the render window or in the explorer tab. Then put the script inside the model and edit it. There will be a single line about CFrames. Change the x, y, z values all to zero and then change one at a time to 0.05 or something and hit play until you find the right rotation direction. |
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 03:36 PM |
s but I did all what you said Output giving me this error with your script
21:35:42.741 - Stack Begin 21:35:42.741 - Script 'Workspace.Model.Spin', Line 5 21:35:42.742 - Stack End
|
|
|
| Report Abuse |
|
|
Mr_King8
|
  |
| Joined: 31 Jul 2010 |
| Total Posts: 1633 |
|
|
| 19 Oct 2016 03:39 PM |
You script works.. But like it says all in does is spin in the same place.. Thanks tho :)
|
|
|
| Report Abuse |
|
|
qqtt991
|
  |
| Joined: 14 Dec 2007 |
| Total Posts: 1387 |
|
|
| 19 Oct 2016 04:38 PM |
| Because you didn't follow the instructions i just gave you. |
|
|
| Report Abuse |
|
|