Need Help With Tool

If you can help please reply because I really need this script.

Leaderstats Script Needed

I Don’t Know How To Make A Leaderstats Script For Normal Scripts

1 Like

Use google for questions like this.

No but I need a script that works for multiple tools.

can you elaborate please? this could mean a million things

Can you elaborate? Are you storing tool data in the leaderstats? How is this linked with tools? Are you trying to save player data?

this should work

function onPlayerJoin(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
 
	local YourValue = Instance.new("IntValue") 
	YourValue.Name = "name" -- change the name
 
end

game:GetService("Players").PlayerAdded:Connect(onPlayerJoin)
1 Like

Thank you! I’ll test it now. Let me see if it works

I already have a leaderstats script I need a +1 leaderstats for it

I’m looking for a script for my leaderstats tool that makes +1 leaderstats value everytime the tool is activated

fire an event to the server to change it every time the tool is clicked

But how do i do this for multiple tools

why would this not work on mutiple tools?

Nvm it’s fine ill try to figure it out

Try this

local tool = script.Parent -- place the script inside the tool

tool.Activated:Connect(function(plr)
plr.leaderstats.YourValue.Value += 1 -- change "YourValue" to the name of the stat
end)
1 Like

this is local, nothing would change on the server

it should work on the server but i might be wrong

Thank you ill try that out eeeeeee

no. it changes for the client, yeah. but the server would stay the same unless a server script is used

What do you mean dude, like a for exampe x and u and r di the same thing or?

1 Like

Instead of this use a remote event