Hello, I’m in the process of trying to figure out how to bind a tool/item to a value.
What I’m trying to achieve is essentially: You find an item, you use this item, and this item now grants it’s user a certain ability, and when given the ability, the player can reset and leave the game and will still keep that ability. Trying to make a personal battlegrounds game for practice for several things such as hitboxes, stuns, vfx, moves, CFrame, Raycasting, all of the above. I’ll be researching Datastore when I get to that, but I wanted to know if anybody could tell me how I could simply assign a permanent value to a player and then even if the player dies, have them still carry said value.
Any and all help means the world to me, so thank you if you read this far.
If you just create a StringValue/NumberValue/BoolValue etc. Instance and parent it on the player every value you set to that instance will stay whether the character dies or not and if you want to keep the value after player exits the game just save it using a Datastore. You can name that instance “ToolDamage” to know whate you’re reffering to. Other ways you can go about this is set an attribute at a tool, call it for exanoke “Damage” and when you need to change the value do: tool:SetAttribute("damage", number)
This will stay for the entirety of the play session of a player and you can also save a value like that using Datastores.
if I parent a bool, string, or even attribute value to a player, dying resets anything that was put in, so I can’t simply do that, getting the value in there is easy, keeping it there is the annoying part.