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: CFrame lerping extremely laggy

Previous Thread :: Next Thread 
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
10 Nov 2016 08:01 AM
https://www.roblox.com/games/540298909/Hover-Quest

Go through the GUIs and then watch the cutscene. I am trying to rotate the whole model smoothly so you can see it turning, but it just lags the whole time.



local function TransformModel(model, newCFrame)
local start = model:GetPrimaryPartCFrame()
for i=0,100 do
model:SetPrimaryPartCFrame(start:Lerp(newCFrame,i/100))
wait()
end
end


Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
10 Nov 2016 08:02 AM
You have to update it on RenderStepped.
Report Abuse
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
10 Nov 2016 08:05 AM
Can RenderStepped be used on a serverside script?


Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
10 Nov 2016 08:08 AM
No.
Report Abuse
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
10 Nov 2016 08:10 AM
So how would I incorporate it into my RemoteEvents/Functions? Wouldn't it be poor to fire the event from the client->server every time RenderStepped is called?


Report Abuse
VioXz is not online. VioXz
Joined: 12 May 2014
Total Posts: 12
10 Nov 2016 08:12 AM
instead of using renderstepped use stepped
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
10 Nov 2016 08:24 AM
^
That is the exact same thing as using a while loop with a wait in it.

@memorycode
I have no idea what your code base looks like, but couldn't you use a RemoteFunction to tell the client how to manipulate the model, and then wait for it to return before continuing? That is the best way I can come up with without knowing more.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
10 Nov 2016 10:08 AM
if you have FE just move the model on the client. not that hard


Report Abuse
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
10 Nov 2016 03:46 PM
Solved

Just passed the model through a RemoteEvent that is handled on the client.
Proceeded to use RenderStepped within that and it worked perfect.

Thank you!


Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
10 Nov 2016 04:26 PM
The game is really cool and has a great concept, but some feedback with the GUIs is to remove the ######## ##### screens you get when you click ########## #### ######### and it takes forever to start.
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
10 Nov 2016 04:26 PM
Nevermind. ROBLOX is garbage.
Report Abuse
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
10 Nov 2016 04:28 PM
@Intended

send me it within a PM and just separate the hashtags. I'd like to read it! :D


Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
10 Nov 2016 04:42 PM
Just enhance the menu a bit. It takes too long with the screen going black so much, but otherwise it is neat and I'd give it a 10/10 so far.
Report Abuse
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
10 Nov 2016 05:16 PM
The menu is simply a placeholder. I just needed something that's easily controllable and functions.

I'll make it pretty later xD

As for the loading, I will look into it. My initial thought is to add a different transition like the frame sliding in from the right.


Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
10 Nov 2016 05:36 PM
Really small wait time:

while coroutine.yield() do
--Some argue this is stupid, but it works
end
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