i try to use this script in a dummy
local hum = script.Parent:WaitForChild("Humanoid")
hum.Died:Connect(function()
game.ServerStorage.Give:Fire(20)
end)
and this script i put it in the leaderstats script (ServerScriptService)
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder", player)
stats.Name = "leaderstats"
local ilmu = Instance.new("IntValue", stats)
ilmu.Name = "Ilmu"
ilmu.Value = 0
local kepintaran = Instance.new("IntValue", stats)
kepintaran.Name = "Kepintaran"
kepintaran.Value = 0
local rank = Instance.new("StringValue", stats)
rank.Name = "Rank"
rank.Value = "Pemula"
game.ServerStorage.Give.Event:Connect(function(Amount)
ilmu.Value = ilmu.Value + Amount --This is the script
end)
end)

2 comments
Can you give us info on the give script?
there's a lot of problems in the script so uhh