I created a script where as a script gets put in the players character with the click of a button then after that i want the script that was inserted to be deleted out the character but i get this error
Hey! Please give us more context to how your code works and how it should work. There isn’t much we can understand from a remote event destroying something within a character which we don’t know how its setup, used, etc. Thank you!
I think when you clone something and don’t parent it, it won’t be available anywhere in the player character, so :FindFirstChild() returns nil since it isn’t there
Sorry for the late response, but this is how the script works
theres a button at the bottom where the player can spawn in an accessory which is supposed to be a type of vehicle thats spawned, each time the button is pressed and the vehicle is present in the players character it is supposed to despawn.
theres a selection of vehicles you can pick from and each have their own ability script which goes inside the character script with the accessory
this is the client script where it takes the button thats pressed then fires to the server which is the server script i showed before, the problem im having is the that was inserted with the accesory is not being deleted as well
for example this is one of the scripts from the selectable vehicles, whenever i despawn my vehicle and the vehicle gets destroyed, the script doesnt get destroyed and it stays
this is whats inside the character, the red bike is the accessory which is able to get deleted when the player presses the button while its inside the character, but pedal pummel is its script and it doesnt get deleted upon the button being clicked after it already being in the player