#Safest way to spawn local parts for each player?

1 messages · Page 1 of 1 (latest)

chilly pewter
#

So i want have a script which will randomly spawn parts only for the player, if i have this as a local script inside startplayerscripts will a exploiter not be able to take advantage of this?

royal path
#

Exploiter will be able to spawn those parts for themselves as far as i know. They wont be affecting other players. If the part rewards the players without validation, then exploiter might be able to spawn it for themselves and spam the reward

chilly pewter
#

But how would I validate them?

unkempt condor
#

Or communicate

chilly pewter
royal path
#

Make a remote event. Fire it when player touches the part. Now on the server you get the player who touched the part, check if reward should be given and if so give it and assign something to show that player has gotten the reward and after cool down of like 60 second (or however it works in your game), you can reset the assignment. This way exploiter can spawn a million parts if they want but they won't get the reward when they touch because the validation happens in a normal script

#

basically only spawn the part, and check for touch to fire event on client and then check for validation on server. If you have like visual effects when touching the part, you can also do those on local script

chilly pewter
chilly pewter
royal path
#

This is just an example of how to implement it, you'll need to figure it out with your game logic yourself. I'm guessing you mean there are multiple collectible parts available in your game at once which would make it a lot more complicated.

If it is not a core part of your game, you can make the parts spawn in server scripts and be visible to everyone instead of there being parts visible only for 1 player. If it is a core part then you gotta work out some logic. You can even change around how the local script works to delete all previous parts for player when new one spawns for cooldown. Again it all depends on how you want it

chilly pewter
chilly pewter
#

@royal path okay so i was working on some stuff and trying to figure it all out but im kind of stuck

chilly pewter
#

but i made a new post bc i have a simlar error to this idea anyway

royal path
unkempt condor
chilly pewter
#

how do i do that?