Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Parts are being deleted when I try to make them local?

I'm trying to make some parts become local parts by setting their parent to a camera named 'LocalBin'. however, once I attempt to do so it always errors with the error message below, deletes all the parts in the folder, and then moves the empty folder into the local bin. Why is is deleting my parts?

"Something unexpectedly tried to set the parent of Local to NULL while trying to set the parent of Local. Current parent is LocalBin."

(This is done from a localscript in the character)

Update: I found that if I move each individual part into the camera instead of the model itself, then the parts show up locally. However, now all of the meshes in the gun have been deleted, and all of the unions just look like big blocks)

1 answer

✓ Accepted answer

It's a replication issue. Here's what really happens:

Client moves the object to the Camera.
Client tells server "Hey, I've moved {x} to {Camera}".
Server says "Hey no wtf is {Camera} I'm only seeing NULL".
Server flips out because the Camera doesn't exist on the server. Server sets the parent to nil.
Server tells the Client this.
Client flips out and kills the part. Whoops.

How to avoid this? Stick FE on and stop using hacky methods.

7 comments

0

Thats hilarious!

0

Isn't FE laggy? I'm using local parts to reduce the amount of triangles the server has to render by making the gun look nice for the local player and in the server just a simple 1 union gun. I assumed that it would be better to not use FE because when I do the server has to create every part that the gun shoots and that would be much more laggy.

0

FE isn't laggy. What you're doing with it is laggy.

0

Oh, I guess I was worried for nothing. After reading this article in studio (http://wiki.roblox.com/index.php?title=Fighting_Lag), I assumed that it would be better to not use Filtering Enabled and use the hacky way, but if you think its good then I'll start using it.

0

I think it's good. I have a blue box, which means you can trust me.

0

:)

0

FilteringEnabled doesn't cause lag, but remotes do. So you could say it indirectly causes lag. You can work around it, though, as the article points out.

This discussion is preserved as it was. New answers, comments, and votes are closed.