To the original poster, I had to define something for the variable named “z” because before it was undeclared, you should probably change what I used however (I just guessed that it might be the script’s parent). Stat.Value += 1 -change value by amount (you can move this to later inside the callback function if necessary) Local stat = leaderstats:WaitForChild("Stat") -change to name of stat Local leaderstats = plr:WaitForChild("leaderstats") Local plr = players:GetPlayerFromCharacter(char) Local char = hit.Parent:FindFirstAncestorOfClass("Model") local characterFolder workspace.Ingame:GetChildren () - this one has a character inside a lot of character for r 1,characterFolder do local plr game.Players:GetPlayerFromCharacter (characterFolder r) local lightwarn plr:WaitForChild ('PlayerGui').Warn - lightwarn. Local players = game:GetService("Players") local z = script.Parent -im assuming this is the scripts parent I don’t think this is a tool script, since there are no references to any of the events shared by Tool instances. This is the current script (Server Script) inside the tree. What solutions have you tried so far? Did you look for solutions on the Developer Hub? What is the issue? Include screenshots / videos if possible! When a Axe hits the tree I want to find the player who used the axe and increase a leaderstat ![]() What do you want to achieve? Keep it simple and clear! ![]() You can write your topic however you want, but you need to answer these questions:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |