|
| 22 Jul 2015 05:25 PM |
This works, and is smoothly animated by the body pos (Cant use renderstepped and cframe because its a SS. Couldnt anyways; its ugly)
But.. im looking for something a bit cooler. Please spiff it up. Heres mine!
game:GetService("RunService").Stepped:connect(function() for i = 1,#Tablets do Tablets[i].TabletPos.position = Character.Torso.CFrame*CFrame.Angles(0,math.rad(i*360/#Tablets),0)*CFrame.new(0,0,-2*#Tablets).p end end) |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 10:14 PM |
This is my new version of it:
game:GetService("RunService").Stepped:connect(function() if not TabletsModel or not Character then return end local Tablets = TabletsModel:GetChildren() for i = 1,#Tablets do if Tablets[i].Parent == TabletsModel and Tablets[i].Name == "Tablet" then if #Tablets >= 5 then Tablets[i].TabletPos.position = Character.Torso.CFrame*CFrame.Angles(0,math.rad(i*360/#Tablets),0)*CFrame.new(0,0,-3*#Tablets).p else Tablets[i].TabletPos.position = Character.Torso.CFrame*CFrame.Angles(0,math.rad(i*360/#Tablets),0)*CFrame.new(0,0,-5*#Tablets).p end end end end) |
|
|
| Report Abuse |
|
|
baldo46
|
  |
| Joined: 28 Jul 2008 |
| Total Posts: 1254 |
|
|
| 22 Jul 2015 10:31 PM |
game:GetService("RunService").Stepped:connect(function() if (not TabletsModel) or (not Character) then return end local Tablets = TabletsModel:GetChildren() local num = (#Tablets >= 5) and -3 or -5; for ind,val in pairs(Tablets) do if --[[val.Parent == TabletsModel *this is redundant*and]] val.Name == "Tablet" then val.TabletPos.position = Character.Torso.CFrame *CFrame.Angles(0,math.rad(ind*360/#Tablets),0) *CFrame.new(0,0,num*#Tablets).p; end end end) |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2015 10:34 PM |
you only edited it
i wanted to make the rot cooler |
|
|
| Report Abuse |
|
|
baldo46
|
  |
| Joined: 28 Jul 2008 |
| Total Posts: 1254 |
|
|
| 22 Jul 2015 10:37 PM |
| I made it more efficient. You don't need to calculate the number -5 or -3 every time if it's the same for each thing. It's wasteful. That's a precious .03 seconds you're wasting. |
|
|
| Report Abuse |
|
|