|
| 14 Jul 2015 10:04 AM |
So I've got a platform that moves down. It studio when I test it, it runs fine. However when in an actual game and I use the script, the model will move down but the blocks will be jumping about and ruining the look of it.
The script I'm using is below. Do you know why this is happening? And any possible fixes?
function holodoorDown() for i=1, 200 do holodoor:TranslateBy(Vector3.new(0,-0.2,0)) wait(.005) end end
StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2015 10:43 AM |
Bump
StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja |
|
|
| Report Abuse |
|
|
redlo43
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 4722 |
|
|
| 14 Jul 2015 10:45 AM |
maybe because that's a server sided script so maybe it's your internet |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 14 Jul 2015 10:47 AM |
that wait is too small. Even though you might think it's .005 seconds, it's actually still the minimum time: 1/30th of a second or .03 seconds.
If you want it to move smoothly and slowly, you either have to decrease the increment of distance or increment of time.
Decreasing the increment of time would require doing it locally on everyone's client, and I don't think you want to get into that
Hello World! |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2015 10:49 AM |
The only problem with making the movement step smaller is that it takes longer.
StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 14 Jul 2015 10:50 AM |
oh, I'm an idiot. You weren't complaining about choppy movement!
This brick displacement you're seeing is a result of moving the model's parts using Vector3s instead of CFrame.
That would be using the function :SetPrimaryPartCFrame () you'll also have to set a primary part in your model
Hello World! |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2015 10:57 AM |
I've set the primary part. Would I want to do this:
:SetPrimaryPartCFrame(Vector3.new(0,-0.2,0))
Or how would I write it?
StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2015 11:01 AM |
Ok, I'm using the line
holodoor:SetPrimaryPartCFrame(CFrame.new(0,-0.2,0))
But this just sets it to the co-ordinates (0,-0.2,0). How do I get the block to move down gradually?
StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 14 Jul 2015 11:57 AM |
holodoor:SetPrimaryPartCFrame(holodoor:GetPrimaryCFrame () * CFrame.new(0,-0.2,0))
Hello World! |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 14 Jul 2015 11:57 AM |
holodoor:SetPrimaryPartCFrame(holodoor:GetPrimaryPartCFrame () * CFrame.new(0,-0.2,0))
Hello World! |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2015 03:35 PM |
I've tried your method and my own slightly varied method, still both using the PrimaryPartByCFrame method, but both still result in chopiness.
StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja |
|
|
| Report Abuse |
|
|