repeat that execute in 100 times: local Players = game:GetService("Players") local…
- User
repeat that execute in 100 times: local Players = game:GetService("Players") local player = Players.LocalPlayer
-- Wait for character and axe to load properly local character = player.Character or player.CharacterAdded:Wait() local axe = character:WaitForChild("Lazer Cutting Axe")
-- Fire the server event axe.SharpenLazer:FireServer()
-- Find the cooldown flag local canShootCooldown = axe:FindFirstChild("CanShootCooldown")
if canShootCooldown and canShootCooldown:IsA("BoolValue") then -- Reset cooldown. Assuming false means can shoot now canShootCooldown.Value = false else warn("CanShootCooldown BoolValue not found or invalid type!") end
- Assistant
Certainly! To repeat the firing of the server event 100 times, you can use a simple
forloop. Here's your modified script to execute the action 100 times in a row:lualocal Players = game:GetService("Players") local player = Players.LocalPlayer -- Wait for character and axe to load properly local character = player.Character or player.CharacterAdded:Wait() local axe = character:WaitForChild("Lazer Cutting Axe") -- Find the cooldown flag local canShootCooldown = axe:FindFirstChild("CanShootCooldown") if canShootCooldown and canShootCooldown:IsA("BoolValue") then for i = 1, 100 do -- Reset cooldown. Assuming false means can shoot now canShootCooldown.Value = false -- Fire the server event axe.SharpenLazer:FireServer() -- Optionally wait a tiny bit between fires if needed -- wait(0.1) end else warn("CanShootCooldown BoolValue not found or invalid type!") end