Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 8 years ago

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

Log in to vote
0
Answered by 8 years ago

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.

0
Thats hilarious! User#11440 120 — 8y
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. tkddude2 75 — 8y
0
FE isn't laggy. What you're doing with it is laggy. User#6546 35 — 8y
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. tkddude2 75 — 8y
View all comments (3 more)
0
I think it's good. I have a blue box, which means you can trust me. User#6546 35 — 8y
0
:) tkddude2 75 — 8y
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. Perci1 4988 — 8y
Ad

Answer this question