I created a system that upon a key being pressed (either the number 1 or number 2 keys) a player will be given a specific script that gives them a different type of cursor. However, the issue is that you can hit 1, then 2, and have both cursors added to the player. The player should only have one at a time. I'm trying to have a for loop that will check the descendants of a player when they press one of the buttons to see if they have a script with a specific name, and if they do, the script is deleted and replaced with a new one, so each time they press a button, the cursor script is reset and they can't have two or more at once. However, I'm not having much luck...
#Trying to make sure a player doesn't have more two specific scripts at the same time?
1 messages · Page 1 of 1 (latest)
In the for loop, loop through player.Character
Curtently ur loopin thru player
good catch! now that that's out of the way, the parts aren't exactly disappearing upon being destroyed
Try adding print(1) after the :Destroy() in the first one and print(2) in the second one and let me know what happens! @sinful lance
dw i figured it out and got it working
i needed to have another remote event that would fire back to the client and then the scripts would be properly destroyed