Hey,
I am creating a shop and in this shop, players can see the weapons model and I clone the models with a LocalScript and not with a Script so that the players don’t see the model of others in the same place.
The problem is that each model got a Script and when the model is cloned the Script into the model doesn’t want to work anymore.
I tried to disabled the Script that it into the model and when it gets cloned I enabled it, but it doesn’t work.
Can someone help me?
– This is how the models are cloned and the place of the Script which no longer wants to work after being cloned. https://streamable.com/jupoxg
Oh, sorry! I misunderstood what you meant before. Read what @Tom_atoes said and try fixing your issue from there, if you need any help - reply to this post.
Server scripts (“normal” scripts) can only run on the server. When you clone the model with a local script (on the client) the server cannot run that script as it doesn’t exist on the server.
I don’t believe local scripts run in the workspace, you will need to run this code from PlayerScripts. I’d recommend using CollectionService to tag the currently active model so you can access it easily.