#Debounce
1 messages · Page 1 of 1 (latest)
i got u
local Cooldown = false -- this is ur cooldown lol
local CooldownTime = 5 -- this is ur cooldown time lol
-- so when u call dat funciton u set it to true
script.Parent.OnServerEvent:Connect(function(Player)
if Cooldown then return end
Cooldown = true
-- the rest of your code
--[[
aosjhdakljhdsna
akosjdhakjdsh
aksjdhakjsdh
akosjdhaksjd
]]
-- after your code logic ends
task.wait(CooldownTime)
Cooldown = false
end)
There's no errors but somehow it dosen't work
A universal cd or player specific cd?
the player specific is just a table
Reasonable
Yeah but sometimes it's a bit more complicated when trying to remove from the table
no
just set it to nil
CooldownTable[player] = nil
das it
still dosen't work
Oh right
lemme look over it more
wjhat the fck
LMAO
BRo
U didnt need to copy my stuff liek dat LOL
U just needed to add the if statment
send ur code
in text lmfao
what stuff
I can't
send it here in the chat
it's over the limit
just send dat part
local TweeningInfo = TweenInfo.new(3,Enum.EasingStyle.Quint,Enum.EasingDirection.Out,0,false,0)
local IsEmpty = false
local Cooldown = false
local CooldownTime = 5
script.Parent.OnServerEvent:Connect(function(Player)
if Cooldown then return end
Cooldown = true
if IsEmpty == false then
local Height = {Value = Player.Character.Humanoid.BodyHeightScale.Value * 2}
local Depth = {Value = Player.Character.Humanoid.BodyDepthScale.Value * 2}
local Width = {Value = Player.Character.Humanoid.BodyWidthScale.Value * 2}
local Head = {Value = Player.Character.Humanoid.HeadScale.Value * 2}
local WdithTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.BodyWidthScale,TweeningInfo,Width)
local HeightTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.BodyHeightScale,TweeningInfo,Height)
local DepthTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.BodyDepthScale,TweeningInfo,Depth)
local HeadTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.HeadScale,TweeningInfo,Head)
WdithTween:Play()
HeightTween:Play()
DepthTween:Play()
HeadTween:Play()
Player.Character.Humanoid.JumpPower = Player.Character.Humanoid.JumpPower * 1
wait(15)
local Height = {Value = Player.Character.Humanoid.BodyHeightScale.Value / 2}
local Depth = {Value = Player.Character.Humanoid.BodyDepthScale.Value / 2}
local Width = {Value = Player.Character.Humanoid.BodyWidthScale.Value / 2}
local Head = {Value = Player.Character.Humanoid.HeadScale.Value / 2}
local WdithTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.BodyWidthScale,TweeningInfo,Width)
local HeightTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.BodyHeightScale,TweeningInfo,Height)
local DepthTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.BodyDepthScale,TweeningInfo,Depth)
local HeadTween = game:GetService("TweenService"):Create(Player.Character.Humanoid.HeadScale,TweeningInfo,Head)
WdithTween:Play()
HeightTween:Play()
DepthTween:Play()
HeadTween:Play()
Player.Character.Humanoid.JumpPower = Player.Character.Humanoid.JumpPower * 1.2
end
task.wait(CooldownTime)
Cooldown = false
end)
it might be formatted weird
but that works
thanks bro!!
damnnnnnnnnnnn
ik but it's not
NVM im stupid the script made it anchored