Number Value Problem

It is working !! But how do i set up the remote event now ?

(preferably in replicatedstorage)

put a remoteevent there

reference the remoteevent in client and a server script
fire the remoteevent once the sanity reaches 0 with remoteevent:FireServer()

in the server do this:

remoteevent.OnServerEvent:Connect(function(player)
player:Kick("Out of Sanity")
end)

do i put a script in the remoteevent ?

nah id recommend in replicatedstorage

sorry to bother you more, but remoteevent isn’t taken as a correct argument.

You don’t have to create a Remove Event just to kick the player.

On your local script, you can just add

player:Kick("Out of Sanity")

Note: To see if it actually kicks the player, you need to test it in-game. When you test it in Studio, it will print out in the Output: "Disconnect from: " followed by a string.

1 Like

thanks, it worked succefully !

1 Like

You know the bug on this one? The game kicks me without the message only in the output.Server kick message: smth like that.you also have that issue?

I tested it in-game and it works fine. I think it’s maybe a bug from your side? I’m not really sure about that.

It was happening when i was doing the event game.i will test again if its fixed.

1 Like

Something wrong on me.still doesnt shows up.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.