How do i find a part that hasn't spawned yet?

but then my tool would be useless as i want my tool to spawn it and it is a server script it isnt local

So you want it to spawn a part when a player equips a tool, and then print something when that part is spawned?

1 Like

i want the tool to spawn something when its clicked i have coded that and it works im doing print to test that it is working i want to make the part remove cash from the leader stats

Ok, to help me understand, what part are you confused about.

1 Like

i want to know how can i make my script recognize the part that gets spawned and destroyed so i can code that part to do stuff

Ok, so you already have your script in the tool that spawns it.
So the script above, I would put in serverscriptservice, so that it would basically be watching for the part to spawn, and then do something when the part does spawn.

well i do that but it dose not work and dose not give a error

Okay, can you verify that the part is being spawned inside of the workspace and has the correct name?

1 Like

image
yep its at the far bottom

this is when you play the game through studio right?
If it’s already spawned when the game starts then it won’t fire.

no i check it it spawns when i click

Oooh, wait, is your script in the tool a localscript?

1 Like

no its a server script not a local it wount work if it isn’t server

I may either be really stupid or I’m just not understanding some part of this, because it should work, could you send a picture of your fully expanded tool and serverscriptservice.

1 Like


here i think we found a unslovable problem

Could you send a video of you spawning in the part, with your workspace included.

1 Like

i dont have any recorders on hand

i click the part appers and it spawns in the workspace too after 15 secs it destroys

It destroys itself after 15 seconds?

1 Like

yes becuse i dont want it to stay there forever