Currently I have 3 "Win Pads" for an obby game I am making. You can play any map randomly, but if you have 0 "Wins" and you go for a win pad that is made after another win pad is made. it does not give you any points because you are supposed to have, for example, 2 maps won before you get a point from the newest win pad. Here are the scripts. (BTW I want the pads to give you 1 map when you touch them, no matter what order you have, I want the win pad to give you 1 map point only ONCE
--stage value of 1
local stage = script.Parent.Stage
script.Parent.Touched:Connect(function(Object)
if Object.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(Object.Parent)
if player.leaderstats.Maps.Value == stage.Value -1 then
player.leaderstats.Maps.Value = stage.Value
end
end
end)
--stage value of 2
local stage = script.Parent.Stage
script.Parent.Touched:Connect(function(Object)
if Object.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(Object.Parent)
if player.leaderstats.Maps.Value == stage.Value -1 then
player.leaderstats.Maps.Value = stage.Value
end
end
end)
--stage value of 3
local stage = script.Parent.Stage
script.Parent.Touched:Connect(function(Object)
if Object.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(Object.Parent)
if player.leaderstats.Maps.Value == stage.Value -1 then
player.leaderstats.Maps.Value = stage.Value
end
end
end)
