gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
do repeating it every 3 seconds :…
- User
do repeating it every 3 seconds : game:GetService("Players").LocalPlayer.Character:WaitForChild("Lazer Cutting Axe"):WaitForChild("SharpenLazer"):FireServer()
- Assistant
You can create a loop in a Roblox LocalScript to repeat the action every 3 seconds. Here’s a simple way to do that using a
while true doloop andwait(3):lualocal Players = game:GetService("Players") local player = Players.LocalPlayer while true do local character = player.Character or player.CharacterAdded:Wait() local axe = character:WaitForChild("Lazer Cutting Axe") local sharpenLazer = axe:WaitForChild("SharpenLazer") sharpenLazer:FireServer() wait(3) endExplanation:
player.Character or player.CharacterAdded:Wait()ensures if the character is not loaded yet, it waits until it is.- Then it waits for the "Lazer Cutting Axe" and its child "SharpenLazer".
- Calls
FireServer()on that RemoteEvent or RemoteFunction. - Waits 3 seconds before repeating.
Make sure this is put in a LocalScript under a client-executed place like StarterPlayerScripts or StarterCharacterScripts.