generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Blocks aren't moving smoothly

Previous Thread :: Next Thread 
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
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
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
14 Jul 2015 10:43 AM
Bump

StratusNinja || Emperor of Stratus || Watch my stream - http://twitch.tv/stratusninja
Report Abuse
redlo43 is not online. 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 is not online. 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
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
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 is not online. 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
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
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
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
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 is not online. 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 is not online. 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
StratusNinja is not online. StratusNinja
Joined: 04 Nov 2012
Total Posts: 6144
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image