Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

my script doesnt fire remoteEvent? (server lock script) [Solved]

Asked by 3 years ago
Edited by JesseSong 3 years ago

Hello im having a issue with my server lock script.

I have 2 script for it a LocalScript (to check for join) and a ServerScript (to check if the server is locked) and a remoteevent called CheckEvent

-- LocalScript
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(plr)
    local ae = plr
    local remot = script.Parent.CheckEvent
    remot:FireServer(ae)
    print("YESSSS")
end)

-- ServerScript script.Parent.CheckEvent.OnServerEvent:Connect(function(player, memer) print(memer) print(player) game.Players:FindFirstChild(memer):Kick("Server is locked !") print("user kicked !") end)

the localscript work and print the yes but the serverscript doesnt print memer, player and dont kick the player

there isnt any error in the console

What i tried Testing it in a non-studio game Change the <thing>:FireServer change plr to ae check if ae return player name

1 answer

Log in to vote
0
Answered by 3 years ago

found it myself i forgot the.Name in plr

Ad

Answer this question