How do I detect when a local part is touched

I have a gui that creates a local part and I would like to detect when it has been touched so it can fire a RemoteEvent however the local part does not respond to when it is touched.


That is the server script which is inside the part that is cloned. Im not really sure how I can detect when a local part is touched with a script inside of the part

Is the part duplicated in a local script?

If so, it won’t fire I believe as it’s only on the client side and therefore is not actually there in the server, so nothing happens to the server.

Can you show us your full code?

So there is no way to interact with parts created in a localscript

You can create a .Touched event on the client(local script) after the server fires the remote event.

You shouldn’t be using the server-side for this situation at all, not sure why that’s there. You’re also overthinking the requirements here. Just connect to Touched on the part from a LocalScript, fire the remote and then destroy the part.

The server can’t use FireServer and there’s no need to have a server script in the part either.

1 Like

Ok since the local script is destroyed after it creates the part i made a new localscript that detects when the part is touched which appears to be working :slight_smile: