I'm very stuck on this script, a little help would be nice! What I'm trying to do is so if the player "Survived" the waves, then they get +1 win on the leaderboard script and if they didn't nothing happens.
Round Script in SSS
local replicatedstorage = game:GetService("ReplicatedStorage")
local status = replicatedstorage:WaitForChild("StatusValue")
local Players = game.Players
local Health = game.Players.Humanoid.Health
while true do
for i = 15,1,-1 do
status.Value = "Intermission: "..i
wait(1)
end
status.Value = "Game in progress"
local map = game.ServerStorage.BaseMap
map:Clone().Parent = game.Workspace
target = CFrame.new(67.98, -47.816, 1156.752)
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
wait(45)
if Players.Health 1+ then Wins.Value = +1
target = CFrame.new(37.095, 103.76, 1214.745)
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
game.Workspace.BaseMap:Destroy()
status.Value = "Game Over!"
end
end
end
Leaderboard Script :
function CreateStats(NewPlayer)
local MainStats = Instance.new("IntValue")
MainStats.Name = "leaderstats"
MainStats.Value = 0
local PointsValue = Instance.new("IntValue")
PointsValue.Name = "Wins"
PointsValue.Value = 0
PointsValue.Parent = MainStats
MainStats.Parent = NewPlayer
return MainStats
end
game.Players.ChildAdded:connect(CreateStats)

4 comments
Well, I think you've got your health stuff wrong, I believe you need to get the players character, then its humanoid, and then just check if humanoid.Health > 0
Can you give me an example? I'm new to humanoid stuff.
CAN SOMEONE JUST EDIT THE SCRIPT AND REPOST IT PLEASE?
Even if you fixed the script as intended, players who respawn and still have health > 1 will get a point. I'd recommend first creating a flag to mark dead players and then make the system just reward anyone who isn't marked by the time the waves end