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 6 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?

1game.Players.PlayerAdded:connect(function(plr)
2if plr.Name=="Bowser_FIlms"
3     while true do
4      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 — 6y
0
@CodeAddict can you explain breifly, and not be rude about it? Bowser_Films -50 — 6y
0
@CodeAddict what do you mean? Bowser_Films -50 — 6y
0
don't kick me plz User#19524 175 — 6y
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 — 6y

2 answers

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

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

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

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:

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

This is the script on the client.

1local Players = game:GetService("Players")
2 
3if Players.LocalPlayer.Name == "Name here" then
4    while true do
5        Instance.new("Part", workspace)
6    end
7end

Answer this question