You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
-
What is the issue? The raiders are grinding points and in order to not let them spam the capping of the points generator it gets disabled which disables also to the that needs to stop them
local ProximityPrompt = script.Parent
local Part = script.Parent.Parent
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
ProximityPrompt.Triggered:Connect(function(Player)
ProximityPrompt.Enabled = false
if Player.TeamColor == BrickColor.new("Lapis") then
for _, Raider in ipairs(Teams.Raiders:GetPlayers()) do
Raider.leaderstats.Points.Value = 0
end
elseif Player.TeamColor == BrickColor.new("Really red") then
Part.BrickColor = Player.TeamColor
local Counter = 0
repeat
task.wait(1)
Counter += 1
Player.leaderstats.Points.Value = Counter
until Player.leaderstats.Points.Value<= 0 or Player.leaderstats.Points.Value >= 1200
end
ProximityPrompt.Enabled = true
end)
https://gyazo.com/9d5bc90637c431cedf111bcfd79e530b – after enabling it from properties
https://gyazo.com/4442be532a919805c64ff5aad4f54f8c - after it gets to zero it keeps going on and doesn’t turn off through the until function.