#Not sure where I should put my debounces and such
1 messages · Page 1 of 1 (latest)
Above one is client
above one is server sided
local ForceUncall = game:GetService("ReplicatedStorage"):FindFirstChild("ForceUncall")
local Stands = {
"TWAU",
"D4C",
"MANDOM",
"TUSK1"
}
local Admins = {
"GokuDoFortinaiti",
"PV_ENDER",
"Mene126demente",
"Too_SlowSad"
}
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if table.find(Admins, player.Name) then
if string.find(message, "!setstand") then
print("Command Detected!")
local args = string.split(message, " ")
if game.Players:FindFirstChild(args[2]) then
print("found "..args[2].." expected to assign the stand "..args[3])
local PlayerAssigned = game.Players:FindFirstChild(args[2])
local Char = PlayerAssigned.Character or PlayerAssigned.CharacterAdded:Wait()
if table.find(Stands, args[3]) then
ForceUncall:FireClient(PlayerAssigned)
Char:FindFirstChild("Stand").Value = args[3]
print("assigned the stand "..args[3].." to the player "..args[2])
end
end
end
end
end)
end)
and above one is the chat comand system which sends a signal to the client of the player so that the client can tell the server to unsummon the stand
my biggest problem here is not knowing where to put debounces or if i should be using any boolvalues and such inside the character for them
both
just have the same debounce timers on server and client, no need for a remote event to replicate the debounces
also dont use uis
use the input action system
instance-based, way easier to add new actions and multi-platform support for the same binds
but how do I share the same debounce timers
** You are now Level 1! **
between server and client
why would you need to share them
cause u told me i have to
you dont
on the client you have the same debounce timer as on the server, prepackaged
when you trigger the action, both the server and client start their timers
no need to have a remote event telling the client when it can and cannot do something
so what do i change im confused
so theres a debounce which is made from the remote event
?
Can't you just make a server sided debounce where you won't need a client side one
no
literally just when action triggered, start debounce on client
when action recieved on server, start debounce on server