|
| 28 May 2015 09:44 AM |
How does taymaster and loleris make their shop item rotate? I've tried everything, but when I use it, the items just update.
http://www.roblox.com/Module3D-v3-0-Official-Release-item?id=251867561 |
|
|
| Report Abuse |
|
|
|
| 28 May 2015 11:34 AM |
| Please! I love this module, but I can't make the items rotate because it keeps updating the CFrame. |
|
|
| Report Abuse |
|
|
|
| 28 May 2015 11:40 AM |
local 3dController = Module3D:Attach3D(Instance guiObj, Instance model)
3dController:SetCFrame(CFrame.angles(i,i,i)) |
|
|
| Report Abuse |
|
|
|
| 28 May 2015 11:40 AM |
The Controller object returned by Adorn3D has a function called SetCFrame, which lets you adjust the CFrame offset from where the module is trying to place it.
Heres an example of a sort
local self = script.Parent local frame = self:WaitForChild("Frame") local guy = workspace:WaitForChild("Guy")
local model = module3D:Adorn3D(frame,guy) model:SetActive(true)
local rs = game:GetService("RunService") local fullRot = math.pi*2 -- 360 degrees in radians.
rs.RenderStepped:connect(function () local rotation = CFrame.Angles(0,tick()%fullRot,0) model:SetCFrame(rotation) end) |
|
|
| Report Abuse |
|
|
|
| 28 May 2015 11:42 AM |
I meant Attach3D, not Adorn3D lol.
|
|
|
| Report Abuse |
|
|
|
| 28 May 2015 11:43 AM |
tick()%fullRot
why not just tick()? |
|
|
| Report Abuse |
|
|
|
| 28 May 2015 11:45 AM |
@builder
Because I'd rather have a number between 0 and 6.28 rather than some massive number in there.
Its not a huge deal, just better to be safe than sorry I guess.
|
|
|
| Report Abuse |
|
|