Xp given to everyone instead of the one player

no I didnt use an event whatsoever, i mainly used a for do loop instead.
i posted the script if you need it

1 Like

What script changes Rock.Health?
What you’re doing right now is making the health changed connection for every player

1 Like

its in a seperate script in workspace, the script only messes with the rock’s drops and health though.

1 Like

He is right, you are having to where everyone has the same detection, rather having the server detect when rock health is <=0 and a mining pick making somesort of tag on it for the server to detect who mined it (hopefully you made a tag system to detect who mined the rock im assuming not)

Shouldn’t be too hard to add a tagging system for your mining tool and then checking tag’s name and then award xp to the player’s name from the tag

1 Like

yeah, I didn’t, imma try to add the tag system if see if it works

1 Like

this should help you get a general idea of what tagging is:

1 Like

ok thank you (i had to extend the text)

1 Like

Question, how will i find the tag if the rock isnt a humanoid.

you can parent the tag however you want. if thats what you’re referring to?

ok i looked at another dev forum and i get how to use a tag system now

also check this post he said he made a slight error in the earlier linked post:

so parent it then add it as a debris item (debris means it goes away and in the post its 2 seconds)

1 Like

oh ok, i get it now. Thank you, imma try to add it now, now that i got a good idea of how to use it.

I tried my best, and now it wont give any xp at all now.

Is there a way i can get a local player from a server script or is that not possible in my case, imma try to use an event instead and see if that works.

how are you checking to damage a block then? There should be a parameter given.

I really don’t know, I’m incredibly confused at this point on what to do. and I’m starting to lose hope alittle.

ok i think i may found a solution, i might make a separate script within the rock that’s a local script, it’ll wait till the rock gets damage, if its health is below 0. It will call the event, and activate the function as well as find the local player

what? No your mining tool is damaging the block, there is a piece of code doing that for you

main problem is each rock waits till the pickaxe hits it and finds a value within the pickaxe called “damage” and minuses its health with the damage value.

Health = Health - Damage

the script within the pickaxe only manages its animations, as well its mining speed.
here’s what the pickaxe looks like
image