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

How do i make it where it only crash for one player, not everyone?

Asked by 5 years ago

I found a way to crash games for server, and made tutorial on it on my channel. But how do i make it where it only crash for one player?

game.Players.PlayerAdded:connect(function(plr)
if plr.Name=="Bowser_FIlms"
     while true do
      Instance.new("Part",game.Workspace)
0
(CAPS LOCK DAY) YOU HAVE A REMOTEEVENT AND THEN EVERY PLAYER SHOULD LISTEN TO IT. THEN ON THE SERVER YOU FIRE THE REMOTE WITH THE USERID AND IF THE USERID MATCHES WITH A PLAYER, THE PLAYER WILL CREATE A LOT OF PARTS. 1TheNoobestNoob 717 — 5y
0
@CodeAddict can you explain breifly, and not be rude about it? Bowser_Films -50 — 5y
0
@CodeAddict what do you mean? Bowser_Films -50 — 5y
0
don't kick me plz User#19524 175 — 5y
0
So basically you want to kick someone? Just use a :kick() next to their Player to kick em' out of the game. OrcaTheFish 95 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

The easiest way would be to use the :Kick() method. You can even include a fun message in the parentheses. For example:

local players = game:GetService("Players") -- this is the recommended way to get the players service
players.PlayerAdded:Connect(function(plr)-- use uppercase C for Connect
    if plr.Name == "Bowser_Films" then -- remember to include then
        plr:Kick("You are dumb") -- funny message
    end
end

I hope this helps and have a great day scripting! Your youtube videos have always been an inspiration to me. An additional way to crash them would be to have a LocalScript in the player that checks the player's name and if it is a certain name then crash the game for them:

-- LocalScript
local players = game:GetService("Players")
local player = players.LocalPlayer
if player.Name = "Bowser_Films" then
    while true do
        local part = Instance.new("Part")
        part.Parent = workspace
        part.Size = Vector3.new(100, 100, 100)-- the laggiest element to change
    end
end
0
This was useful. Friend me in roblox i might need a dev like you Bowser_Films -50 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

This is the script on the client.

local Players = game:GetService("Players")

if Players.LocalPlayer.Name == "Name here" then
    while true do
        Instance.new("Part", workspace)
    end
end

Answer this question