How can I crash a specific client from the server?

Hello, so is there a way to crash a specific client (something similar to

while true do

) from the server to the client? Please let me know.

Be more specific please. If you want to modify a single client from the server, use a remote event. If you want to kick a player from the game, use player:Kick(“Reason”) (it works in client and server)

2 Likes

why would you want to this…? just kick if you want the to leave

Yes i already have the kick set up, the crash is just another layer.
I want the server to be able to crash the client, best without remotes because if I use remotes the client still has to execute the crash code, the server is just sending the signal.

What i mean is it would just look like this:

-- server script
RemoteEvent:FireClient("Crash")

-- local script
RemoteEvent.OnClientEvent:Connect(function(args)
-- check sanity 
while true do end
end)

I just want it as “extra” i guess lol

-- SERVER SCRIPT

RepStore.RemoteEvent:FireClient(playerWhoCrashes)


-- LOCAL SCRIPT

RepStore.RemoteEvent.OnClientEvent:Connect(function()
   local player = game.Players.LocalPlayer
   while true do
      local L = Instance.new('Part', workspace)
   end
end)

I have not tried this out but using this on a local script would only replicate onto one client causing an overload and not the rest of the server or the clients.

1 Like

This is still the client executing the crash code, i want the server to execute the code itself and the client to have the effects.

That’s not how it works, but you can do Player:Destroy() to completely break their game

2 Likes

Anything you run on a server script will replicate to all clients. That’s just how it works, but if you want to mess around with the client causing others to view it, you could probably do


if player.UserId == USid then
  -- DESTROYS
  player:Destroy()
  -- FREEZE GAME
  for i, v in pairs(player.Character:GetDescendants) do
     if v:IsA('BasePart') then
          v.Anchored = true
     end
  end
  -- DESTROY VALUES
  for i, v in pairs(Player:GetChildren()) do
      if v:IsA('Folder') then
          v.Parent = nil
      end
  end  
end

There are a lot more ways you can mess with the client.

Freeze game is probably my best option I’d recommend as it does not look odd to other players and just freezes the person in place. Only client could see results, it would run on server but it wouldn’t look out of place.

2 Likes