Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

When i kill the dummy, why it is gives everyone the same reward as the killer?

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

0

Can you give us info on the give script?

0

there's a lot of problems in the script so uhh

1 answer

✓ Accepted answer

You're giving every player your cash because you do not define the killer in any way. You won't get more far than this as you need to provide the model (tool) & scripts. Try adding this to the script which kills the dummy, and add a player argument in the Give BindableEvent.

Hope this helps, Metatable out!

This discussion is preserved as it was. New answers, comments, and votes are closed.