I made a weapon that holds a basedamage value. I also made a skill-system that allows you to spend Points on Stats like Damage, Speed and Health. How can I access the Stats inside the Local Player with a "normal" script inside my weapon? The stats object inside of the player is in ReplicatedStorage and gets assigned to the player once they enter.
1 | local BaseDamage = script.Parent.BaseDamage.Value |
2 | local AddedDamage = --[[ This is the problem. How do I access the stats of the Player? I tried it with game.Players.PlayerAdded, but I only get the Value "nil" for the Damage value inside of stats, but it should be 300. |
3 | ]] |
As always, thanks in advance!
1 | Tool.Activated:Connect( function () |
2 | local char = Tool.Parent -- Here is the character |
3 | local plr = game.Players:GetPlayerFromCharacter(char) -- Here is the player |
4 | end ) |