#Not sure where I should put my debounces and such

1 messages · Page 1 of 1 (latest)

finite kestrel
#

I got a jjba stand system im making and I'm having big issues with if I should put my debounces on local and share it with server-sided because I have a command script which sets me a stand and when I set it to that assigned person the stand they have automatically unsummons but its buggy

#

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

lucid kite
#

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

finite kestrel
uncut inletBOT
#

studio** You are now Level 1! **studio

finite kestrel
#

between server and client

lucid kite
finite kestrel
lucid kite
#

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

finite kestrel
#

so what do i change im confused

finite kestrel
#

?

glass gazelle
#

Can't you just make a server sided debounce where you won't need a client side one

lucid kite
#

literally just when action triggered, start debounce on client

#

when action recieved on server, start debounce on server