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

How would I crash a player's client locally?

Asked by 8 years ago

In the past, usually from exploiters and on scriptbuilder, I have seen people crashing other players 'clients' not their game, just the client. So when they do that a message shows saying 'You have lost connection to the game'.

I've tried many ways and they will not work. Here are a couple

Player:Kick("You have been kicked!") -- Serversided only

Instance.new("RemoteEvent",workspace):FireClient(Plaer,{string.rep("Boom",2e5+5)}) -- Serversided only

Player:remove() -- Kicks but no message on screen, player 'still in the game'

If you know any ones that do show a message saying 'You have lost connection to the game' aka crashing their clients, please do tell me!

Thanks

~ Expression

0
What confuses me is, the first one crashes the client. It does nothing else - it is called from the server, but that changes nothing. What exactly are you trying to accomplish? TheDeadlyPanther 2460 — 8y
0
I am trying to 'crash' the player's client locally, from a local script.. Expresssion 5 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

To crash the player in a local script, all you would really have to do is run a while true do loop.

while true do end-- this is is

But you shouldn't do this. You can send a message to a server telling it to Kick the player using Remote Events.

To use this, simple get the player you want on the server, in a regular script, and use Kick on them.

--// Regular Script; Server Sided
local plr = game.Players.OldPal

plr:Kick()

This will disconnect the player's client from the server.

You can also display a message.

--// Regular Script; Server Sided
ocal plr = game.Players.OldPal

plr:Kick("You have been kicked for being a meany")

Now to set the code up with Remote Events is rather easy. Simple make a Remote Event in ReplicatedStorage, define this in both of the scripts, and fire and do stuff when the signal is received.

--// Local Script
local RE = game:GetService("ReplicatedStorage"):WaitForChild(""RemoteEvent)
local plr = game:GetService("Players").LocalPlayer
function KickPlayer()
    RE:FireServer() -- Kicks player
end

and

local RE = game:GetService("ReplicatedStorage"):WaitForChild(""RemoteEvent)

RE.OnServerEvent:Connect(function(plr)
    plr:Kick("Kicked")
end)

It's as simple as that.

Ad

Answer this question