#how to delete that i created clone
1 messages · Page 1 of 1 (latest)
ty
Omg :destroy() 💀
Are u fucking trolling me
he said to delete it
i have new question
What do you think debris does?
how to do cooldown on clicks
Deleted after some time
Debounce and yields
cd = true
button.MouseButton1:Connect(function()
If cd = false then
return
end
cd = false
task.delay(x, function()
cd = true
end
end)
ty i will try
if cd = false …
Declaring vs comparison 🤷♂️
Anyways @clever sand, make sure to handle debounces (cooldowns) on the server. Just adds a good layer of anticheat
ok
Script.parent
local WaitTime = 0.5
local damage = 10
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local debounce = false
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid and not debounce then
debounce = true
humanoid:TakeDamage(damage)
wait(WaitTime)
debounce = false
end
end) what i did wrong in that code? that code for htibox that spawning and deleting
** You are now Level 1! **
its nor working and dont dealing damage
uh
is humanoid a boolean ?
like in your code
idk
try to do local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
ok
oh no its not my bad
btw is this a local script?
cuz there is a player variable
yes
make sure its a script and delete the player things
if you plan to deal damage to player you need to do it on server side not on client side
oh ok,thank you