I’m dynamically constructing a level at the start of my game and that involves copying and moving around some large models. Recently I started getting this error.
ServerScriptService.Main:70: Script timeout: exhausted allowed execution time - Server - Main:408
Is there any way I can stop Model:MoveTo() from counting against my script time? There’s no easy way for me to break this model up into smaller models.
:PivotTo and :MoveTo have 2 different behaviours. :MoveTo accounts for objects at the specified Vector3 position and moves the model position upwards until the model doesn’t collide with anything while :PivotTo just moves the model to specified CFrame without accounting for other BaseParts.
How are you moving your model? Moving the primary part should not be script intensive. Is this an animation? Tween service?
And how large is large? I’ve accidentally grabbed a city block and studio didn’t think very hard about dropping it off miles away. This is either absolutely massive, or you have a script error.
Right now I am using the collision detection functionality of :MoveTo, but I know the bounds of everything so I could probably use PivotTo with a little work, if that is like setting the CFrame of the Model’s primary part.
I’m just setting the Cframe of the primary part and that is much faster, so that’s the solution this time.
If I did need the functionality of MoveTo() then I would be totally stuck here. Seems like Engine time and Script time should be counted differently or the timeout should be configurable.