I use this code in a Character Customization script in my ServerScriptService. It works in my own game on my own model, however when using it on my friend’s game on a different model (of similar design) it doesn’t function. My assumption is that it’s because it’s deprecated - though RemoteEvents in general are failing to fire on this game and I’m not sure why.
I need help fixing this code and possibly figuring out why RemoteEvents aren’t functioning on my friend’s game. Please answer quick and thanks in advance! <3
The problem is that I don’t know how to make that replacement in my script without breaking things. I’m not an experienced programmer and I’ve basically winged everything up until this point.
Replace SetPrimaryPartCFrame with PivotTo. MoveTo moves the primary part to the specified position, but if there are obstructions, the model will be moved upwards until it’s clear. For your case, I recommend using PivotTo, as it performs similarly but does not adjust the model’s height, just like SetPrimaryPartCFrame.
You can set the primary part of a model in the properties window when the model is selected.
Thanks a ton! This easily fixed my game. Both of you were a huge help, I can’t believe I missed something so simple. All of my events are working just fine now.