Hewwo, I have a question.
Everytime I click the Part, it won't have a cooldown..(You can click it as much as you want) I would be grateful for help. Thanks!
--script
local part = script.Parent
local clickd = script.Parent.ClickDetector
local berrysLeft = script.Parent.BerryLeft
local berryAmount = script.Parent.BerryAmount
local rep = game:GetService("ReplicatedStorage")
local remote = rep.Remotes.ClickBerrys
local deBerry = 1
local debounce = false
local getClickRemote = rep.TestRemote.ChangeValue
local getClickValueRemote = rep.TestRemote.getChangedValue
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local CollectingSpeed = player.Skills.CollectingSpeed
CollectingSpeed.Changed:Connect(function(changed)
print(CollectingSpeed.Value)
end)
clickd.MouseClick:Connect(function(clicked)
if not debounce then
debounce = true
berrysLeft.Value = berrysLeft.Value - deBerry
part.Size = part.Size + Vector3.new(0,-0.25,0)
--
local deb = false
getClickValueRemote.OnServerEvent:Connect(function(player, CollectingSpeedV)
if deb == false then
debounce = true
wait(CollectingSpeedV) --wait Amount to Click again
debounce = false
end
end)
--
wait()
debounce = false
end
end)
end)
end)

16 comments
I can't click the part now.
any errors?
It's working now. I refreshed the page and you changed something. Thank you so much :3
oh alright, your welcome. Accept it as your answer since it worked so other people know it's solved.
yes
Im new, how can i do this?
you press 'accept answer' at the bottom of the question ( or page ).
I'm sorry to bother you even more, but I really can't find it...
its right under the comment box, don't worry, it's not a problem if you can't find it.
There is just "Edit, Remove and Report" :(
its under my answer, not your question.
There is just "Report"
no idea, doesn't matter anyways it's okay if you find out how then you can do it not a big deal, anyways have fun scripting.
Thank you.:3
i'll accept for you
Thanks, kirda.