How can I only reward players in the match using another script?

Well I haven’t read your script so I don’t really know. If you put while true do its just gonna award everyone in a loop forever which I don’t think you really want/

No its not like that. I know what I am doing i just need something defined so I will use this to define it.

Im testing it right now.

30 charssssssssss

I can’t really help you because I don’t know the method you are using for getting players because you only want to reward survivors right? If it works its fine though.

Im so confused right now.

Please someone just modify my script to do this:
Give me both modified scripts, so I can copy and paste.

I would write out a script except I don’t really understand what the concept of the game is and how the game ends and how the game starts? Like for example when you die do you return to the lobby or is it just based on if you survive the entire round it gives you rewards.

If you die you return to the lobby. If you destroy all the zombies in a wave the other wave starts and your supposed to get money.

It starts after the game ends and it ends when the time runs out or when all the players die.
Currently it doesnt end when the time runs out but I will fix that.

Its almost been 2 hours I really need to get this done.

Also im not gonna lie your wave system is very inefficient.

Yeah thats because I made it. But can you please work with it?

[script.Parent.Wave] Can I know what value that is like what object?

That part is just so that it starts another wave when all zombies in the first wave have died.

Its a folder btw.

I thought you were awarding the players inside the wave script. Anyway, since you already have a wave value you can something like his.

-- Put this outside of the while loop in the main script.
function AwardPlayers(plrs,Amount)
	for i,plr in ipairs(plrs) do
		plr:FindFirstChild('leaderstats').Coin.Value = plr:FindFirstChild('leaderstats').Coin.Value + Amount
	end	
end
game.Workspace.Wave1.Monsters:GetPropertyChangedSignal("Value"):Connect(function() -- Awards when wave 1 is done
	if game.Workspace.Wave1.Monsters.Value == 0 then
		AwardPlayers(plrs,100)
		print("End of the wave")
	end
end)

An alternative solution would be to use a bindable event and fire it at the end of each wave. Finally, call the award function from the event handler.

But that code only works for 1 wave. Also you don’t even need to use a remote event or a bindable event. You also do not need to call from an event handler. I also do not understand how you can set a folder to 1? Won’t that error?

Its fine I will try his script you just arent understanding well but its ok. :smiley:

Im shrinking your script to 10 lines. Its kinda hard for me to read.

Yeah ok its fine that will help you. But are you sure his script wont work?

You can test his script I’m going to make a more efficient one tho.

Ok I will test his now. Also if his works you dont need to make a efficent one I really dont care.