im not great at script guis but i made this little punch thing but the function wont play when i click the button.. pls help!
--Made by ParionFire
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local punchEvent = ReplicatedStorage:WaitForChild("PunchEvent")
local Button = script.parent.MouseButton1Down
local ready = true
local function punch(inputObject, gameProcessed)
if Button == true and ready then
print("uhhhh workin")
punchEvent:FireServer()
ready = false
wait(0.5)
ready = true
end
end
UserInputService.InputBegan:Connect(punch)
-----------------

1 comment
https://developer.roblox.com/en-us/api-reference/event/GuiButton/MouseButton1Down