So I am a begginer developer trying to make a King of the hill game here is the list of things i want to do:
- make it so when you step in you gain time
- round ends after a certain period of time
- player who satys in the longest gets a stat called “Win”
Here is my script so far
local hill = script.Parent
local range = tonumber(script.Parent.Size.Y)
while true do
for i,v in ipairs(game.Players:GetPlayers()) do
if v.Character ~= nil and v.Character:FindFirstChild("Torso") then
if (v.Character:FindFirstChild("Torso").Position - hill.Position).Magnitude <= range then
v:FindFirstChild('leaderstats'):FindFirstChild("Time").Value = v:FindFirstChild('leaderstats'):FindFirstChild("Time").Value+ 1
end
end
end
wait(1)
end