#BanASync & PCall not running (remote event firing but not being received?)

1 messages · Page 1 of 1 (latest)

light mauve
#

No error shi too

#

remote events are fine n shi

light mauve
#

@livid escarp 😭have you got any clue

#

I need a hero

#

the top print.. prints

#

I aint spend 2hrs writing shi just for the ban to break

livid escarp
#

So, whats the issue?

light mauve
#

and ts idk what i mean

light mauve
#

My Client is successfully firing a RemoteEvent, but the Server's OnServerEvent listener isn't triggering the print statements inside it, even though both scripts see the same Remote object and the Admin ID check is passed.

#

like how is it possible my client fires an event, and the server just dont recieve it (it recieves it when i fire the same event from dif scripts like my fly one)

#

or wait I see it only does that when I run Server & Local instead of play

livid escarp
#
remote.OnServerEvent:Connect(function(player, command, targetName, reason)
    print("SERVER RECEIVED: ", command, "TARGET: ", targetName)
    if not AdminConfig[player.UserId] then 
      warn("User is not an admin")
      return 
    end
      
    local target = Players:FindFirstChild(targetName)
    if not target then 
      warn("Target failed")
      return 
    end
#

Try adding these changes

light mauve
#

the SERVER RECEIVED thing dont run if its on a server & local test meaning its just like blocking the fireserver

light mauve
#
task.wait(1)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remote = ReplicatedStorage:WaitForChild("AdminCommand")

local runButton = script.Parent
local playerBox = runButton:WaitForChild("Target") 
local reasonBox = runButton:WaitForChild("Reason")

print("Remote Found:", remote)
print("Remote class:", remote.ClassName)

if not game:IsLoaded() then game.Loaded:Wait() end

task.wait(1)
runButton.MouseButton1Click:Connect(function()
    if playerBox and reasonBox then
        local targetName = playerBox.Text
        local reason = reasonBox.Text

        if targetName ~= "" then
            remote:FireServer("Ban", targetName, reason)
            print("FireServer sent to AdminHandler")
        end
    end
end)
#

I wanna try apply for s1 one day but w shi like this i aint never finna be able to do that 😭

livid escarp
#

remote:FireServer("Ban", targetName, reason)

try doing just this line

light mauve
#

what like uh

#

in the command line during game test?

livid escarp
#

if not game:IsLoaded() then game.Loaded:Wait() end

#

oh

#

thats not how

#

remove that line

light mauve
#

it doesnt affect it btw

#

but ill remove it

#

i added that after for test

livid escarp
#

idk then

light mauve
#

@livid escarp

#

my fault

#

idk why i pinged

#

saw u online n did

#

but uh yeah

#

local and server just makes it tweak