my code
local reload_sound = script.Parent.Reload local tool = script.Parent local handle = tool.Handle local userInputService = game:GetService("UserInputService") local debounce = false local player = game:GetService("Players").LocalPlayer userInputService.InputBegan:Connect(function(input, gameProcessedEvent) if input.KeyCode == Enum.KeyCode.R then if tool.Parent == player.Character and script.Parent.AmmoValue.Value < 30 then reload_sound:Play() script.Parent.AmmoValue.Value = 30 -- what i want to change else end end end)
Closed as Not Constructive by JesseSong
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?