#[PLS HELP] i want to make a script to add a warning to the player leaderstat but how do i do this?

369 messages · Page 1 of 1 (latest)

frail ibex
#

this is the script

#

how do i make it so it adds up

#

i want to change this part so i have to enter the player id in stead of making a whole admin system

#

can someone give me a fixed script?

rugged lichen
#

could you do ```lua
print(OnPlayerChatted(rustyrean2011, "!warn rustyrean2011"))

#

put the line at the bottom of the script

frail ibex
#

alright hold on

rugged lichen
#

or wait

#

that will probably give an error

frail ibex
#

yep

rugged lichen
#

print(OnPlayerChatted(game.Players.rustyrean2011, "!warn rustyrean2011"))```
#

anyhow

frail ibex
#

wait what

rugged lichen
#

yeah

#

may be a typo

#

what is your username including any capital letters?

frail ibex
#

rustyrean2011

rugged lichen
#

looks about right

#

well

#

i think i figured out why it did that

#
print(OnPlayerChatted(game.Players.rustyrean2011, "!warn rustyrean2011"))```
frail ibex
#

these are all the scripts btw

rugged lichen
frail ibex
rugged lichen
#

this should make it a bit more readable

wait(1)
print("OVERHERE!")
print(OnPlayerChatted(game.Players.rustyrean2011, "!warn rustyrean2011"))```
#

if it doesnt print then it means the script isnt working

frail ibex
#

it doesnt print

#

rip

rugged lichen
#

so

#

is that the full output error log?

frail ibex
#

no

#

i deleted all scripts the only script about warnings is this one now

#

so i need to create a simple script to give people warnings

vernal mortarBOT
#

studio** You are now Level 3! **studio

rugged lichen
#

the last script even though it was ai technically is functional

frail ibex
#

i used chatgpt for the scripts yea

#

wai hold on

rugged lichen
#

can you paste the script here?

frail ibex
#

alright

#

-- Server Script (ServerScriptService)

-- Function to handle when a player joins the game
local function PlayerAdded(player)
-- Create leaderstats folder for the player
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player

-- Create warning stat
local Warnings = Instance.new("IntValue")
Warnings.Name = "Warnings"
Warnings.Value = 0 -- Set initial Warning value to 0
Warnings.Parent = leaderstats

end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
-- Clean up player data if needed
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)

rugged lichen
frail ibex
#

i tried to make it true

#

when i said !warn rustyrean2011 it didnt gave an error in the output but it didnt give me a warning either

#

i undeleted the script

#

it doesnt give an error

#

but it doesnt give me a warning either

rugged lichen
#

under lua local targetPlayer = blah blah blah
put down

print("ISSUEHERE!")
print(targetPlayer)```
frail ibex
#

where is local targetplayer thingt

rugged lichen
frail ibex
rugged lichen
#

yes

frail ibex
#

so now

rugged lichen
#

does the error log have anything?

frail ibex
#

let me find it wait

#

there it is

rugged lichen
#

yes

#

it appears somewhere near line 26 or 40 there was an issue

frail ibex
rugged lichen
#

ah yes

#

before setting warning.value, you should create something like

local amount = 1```
#

which will add 1 warning

vernal mortarBOT
#

studio** You are now Level 5! **studio

frail ibex
#

shouldnt it be local amount = 0

#

because the starter amount is 0

rugged lichen
#

0 is nil

#

since mathematically

#

0 is kind of nothing

#

so its nil

frail ibex
#

ah

#

like this

rugged lichen
#

yes

frail ibex
#

but a slight slight problem

#

if i have this doesnt it mean everyone can use the command

rugged lichen
#

yep so

frail ibex
#

so i want to enter like a player id

#

that i have to enter a player id and then that players gets the command

rugged lichen
#

replace local isadmin with

local isAdmin
if player.Name = "USERNAMEHERE" then isAdmin = true else return 0 end```
frail ibex
rugged lichen
#

right

frail ibex
#

alright lets see

rugged lichen
#

make = to ==

#

i forgor to make it ==

#

not for setting it to true though

frail ibex
rugged lichen
#

yes

#

that is all you need to do

frail ibex
#

it works

#

but now if i make it not my username

rugged lichen
#

btw

#

one more thing

#

if you ever have a list of players you could do something like

frail ibex
#

thanks

#

this right

#

with a comma

#

oops without the spaces

#

right

#

?

rugged lichen
#
local isAdmin
local list = {
"USERNAMEHERE";

}
if table.find(list,player.Name) then isAdmin = true else return 0 end```
#

sort of

#

its creating a table

#

im not actually sure if it will all work through

#

but it should

#

in theory

frail ibex
rugged lichen
#

well

#

not exactly

frail ibex
#

im pretty sure it does

rugged lichen
#

you gotta create a table for these kind of things

frail ibex
#

so the warnings work

#

but how do i add multiple people

rugged lichen
#

uh

#

i would say just

frail ibex
#

like this?

rugged lichen
#

yes

#

if you want to give them

#

warning perms

#

then you do that

frail ibex
#

alright

#

but it doesnt save

#

if i leave

rugged lichen
#

it does save

#

as long as your username is in that list

frail ibex
#

i mean

rugged lichen
#

it will always reference from that list

#

well

frail ibex
#

the warnings doesnt save if the player leaves

#

i want the warnings to stack up

rugged lichen
#

you gotta use datastore service i think

#

i havent used datastore service in a while

#

but it shouldnt be too hard

frail ibex
vernal mortarBOT
#

studio** You are now Level 4! **studio

rugged lichen
frail ibex
#

how to do the komma

#

ah

#

i cant press enter

#

grr

#

so i asked chatgpt for a leaderstat saving script

#

and im not sure if it works

rugged lichen
#

i have no idea if this works

local function PlayerAdded(player)
    local ds = dss:GetDataStore("warns"):GetAsync(player.UserId)
    
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    -- Create warning stat
    local Warnings = Instance.new("IntValue")
    Warnings.Name = "Warnings"
    if ds then
        Warnings.Value = ds
    else
        Warnings.Value = 0 -- Set initial Warning value to 0
    end
    
    Warnings.Parent = leaderstats
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:GetDataStore("warns"):SetAsync(player.UserId, player:FindFirstChild("leaderstats").Warnings.Value)
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

anyways

#

dont forget to go to game settings

#

then security

#

and enable datastores

frail ibex
#

it doesnt work ._.

rugged lichen
#

or else it wont work

frail ibex
#

o

#

i alr have it

rugged lichen
#

yes

frail ibex
#

so the chatgpt doesnt work

rugged lichen
#

in theory

#

it should save warnings

rugged lichen
#

describing your project

#

in order for it to understand what you want

frail ibex
#

ah

#

i aint doing allat

#

hmm doesnt save

#

your script

rugged lichen
#

any errors?

frail ibex
#

i dont think so

rugged lichen
#
local dss = game:GetService("DataStoreService")
local function PlayerAdded(player)
    local ds = dss:GetDataStore("warns"):GetAsync(player.UserId)

    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    -- Create warning stat
    local Warnings = Instance.new("IntValue")
    Warnings.Name = "Warnings"
    if ds then
        Warnings.Value = ds
    else
        Warnings.Value = 0 -- Set initial Warning value to 0
    end

    Warnings.Parent = leaderstats
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:GetDataStore("warns"):SetAsync(player.UserId, player:FindFirstChild("leaderstats").Warnings.Value)
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

i forgor to add dss to the script ig

frail ibex
#

lets see

#

rip

#

i dont think it gives an error

rugged lichen
#
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)

    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    -- Create warning stat
    local Warnings = Instance.new("IntValue")
    Warnings.Name = "Warnings"
    if ds then
        Warnings.Value = ds
    else
        Warnings.Value = 0 -- Set initial Warning value to 0
    end

    Warnings.Parent = leaderstats
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player:FindFirstChild("leaderstats").Warnings.Value)
    print(player.Name.." has left with warnings : "..player:FindFirstChild("leaderstats").Warnings.Value)
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

i have no clue if this will work

#

if it wont work

#

the error message will say

frail ibex
rugged lichen
#

i need to see what the print message was before

#

it should print a message containing the amount of warnings the player has after leaving the game

frail ibex
#

wdym

rugged lichen
#

this line
print(player.Name.." has left with warnings : "..player:FindFirstChild("leaderstats").Warnings.Value)

#

prints a message when you leave the game

frail ibex
#

like this

rugged lichen
#

damn

#

wait

#

you havent left the game yet

#

when you leave the game

#

it will print the message

frail ibex
rugged lichen
#

uh

rugged lichen
frail ibex
#

ah

#

i made like a new script like this

#

woops

rugged lichen
#

just uh

frail ibex
#

like that

rugged lichen
#

remove the new script

rugged lichen
#

replace with the new code

frail ibex
#

this one right

rugged lichen
#

yes

frail ibex
#

alrighgt

#

i replaced it

rugged lichen
#

mk

#

now see if the warnings save

#

after leaving the game

#

show the output error log

#

if it contains your username and the amount of warnings you got

frail ibex
#

doesnt save

vernal mortarBOT
#

studio** You are now Level 5! **studio

rugged lichen
#

when you left

#

did it print a message

#

in studio

frail ibex
#

hold on

rugged lichen
#

replace

local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player:FindFirstChild("leaderstats").Warnings.Value)
    print(player.Name.." has left with warnings : "..player:FindFirstChild("leaderstats").Warnings.Value)
end```
with
```lua
local function PlayerRemoving(player)
        print("test")
        print(player.Name)
    dss:SetAsync(player.UserId, player:FindFirstChild("leaderstats").Warnings.Value)
    print(player.Name.." has left with warnings : "..player:FindFirstChild("leaderstats").Warnings.Value)
end```
and then run the game, stop it and check the output
frail ibex
#

local function playerremoving bla bla

#

this part

rugged lichen
#

yes

#

the one that says

#

local function playerremoving

frail ibex
#

like this

rugged lichen
#

yep

frail ibex
rugged lichen
#

damn

#

it got stuck trying to find the leaderstats i think

frail ibex
#

mmm yea

rugged lichen
#
local function PlayerRemoving(player)
        print("test")
        print(player.Name)
    dss:SetAsync(player.UserId, player:FindFirstChild("leaderstats").Warnings.Value)
    print(player.Name.." has left with warnings : "..player.leaderstats.Warnings.Value)
end```
#

if it doesnt work

#

then i know the problem

#

and it is not very fun to fix

vernal mortarBOT
#

studio** You are now Level 6! **studio

rugged lichen
#

eh

frail ibex
#

hmm

rugged lichen
#

wait

frail ibex
#

like this

rugged lichen
#

that is the exact same line

frail ibex
#

o yea

#

nothing changed

rugged lichen
#

i think i forgot to paste the right one

#
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player.leaderstats.Warnings.Value)
    print(player.Name.." has left with warnings : "..player.leaderstats.Warnings.Value)
end```
frail ibex
rugged lichen
#

mhm

frail ibex
#

nothing appeared sadly

rugged lichen
#

mk

#
local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    -- Create warning stat
    local Warnings = Instance.new("IntValue")
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end
    player.leaderstats.Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
    Warnings.Parent = leaderstats
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player.leaderstats.Warnings.Value)
    print(player.Name.." has left with warnings : "..player.leaderstats.Warnings.Value)
    checklist.[player.UserId]
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

replace the entire script

frail ibex
#

yeaaa where do i put this

#

._.

#

ooo

#

ok

#

this script?

rugged lichen
#

yes

frail ibex
#

ok hopefully it works

rugged lichen
#

hol up

#
local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    -- Create warning stat
    local Warnings = Instance.new("IntValue")
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end
    player.leaderstats.Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
    Warnings.Parent = leaderstats
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player.leaderstats.Warnings.Value)
    print(player.Name.." has left with warnings : "..player.leaderstats.Warnings.Value)
    checklist.[player.UserId] = nil
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

this should get rid of the squiggly lines

frail ibex
#

erm the whole leaderstat doesnt work

frail ibex
#

that script

#

you poste

#

but the whole leaderstat doesnt show

rugged lichen
frail ibex
rugged lichen
#

the messages look

#

identical

rugged lichen
#

mk

#

it fail to show leaderstats?

frail ibex
#

this is the script

#

but the leaderstat wont show in game

rugged lichen
#

new

local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    -- Create warning stat
    local Warnings = Instance.new("IntValue")
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end
    Warnings.Parent = leaderstats
    player.leaderstats.Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player.leaderstats.Warnings.Value)
    print(player.Name.." has left with warnings : "..player.leaderstats.Warnings.Value)
    checklist.[player.UserId]
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

gotta pray no sneaky bugs make this script fail

frail ibex
rugged lichen
#

and again

local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    -- Create warning stat
    local Warnings = Instance.new("IntValue")
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end
    Warnings.Parent = leaderstats
    Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player.leaderstats.Warnings.Value)
    print(player.Name.." has left with warnings : "..player.leaderstats.Warnings.Value)
    checklist.[player.UserId]
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
frail ibex
#

its the exact same script

#

im pretty sure

rugged lichen
#

i just shortened one of the variables

#

so

#

it is less prone to

#

failing

frail ibex
rugged lichen
#

alr

#

no apparent error messages

frail ibex
rugged lichen
#
local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder",player)
    leaderstats.Name = "leaderstats"

    -- Create warning stat
    local Warnings = Instance.new("IntValue",leaderstats)
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end
    
    Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, player.leaderstats.Warnings.Value)
    print(player.Name.." has left with warnings : "..player.leaderstats.Warnings.Value)
    checklist[player.UserId] = nil
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
frail ibex
rugged lichen
#

test datastore

frail ibex
#

ARGH

rugged lichen
#

so

#

okay

#

start the game

#

stop the game

#

check console

#

see if there is a message

frail ibex
#

console?

#

output?

rugged lichen
#

yes

#

same-ish

frail ibex
#

not message

#

no*

rugged lichen
#
local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder",player)
    leaderstats.Name = "leaderstats"

    -- Create warning stat
    local Warnings = Instance.new("IntValue",leaderstats)
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end

    Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    dss:SetAsync(player.UserId, checklist[player.UserId])
    print(player.Name.." has left with warnings : "..checklist[player.UserId])
    checklist[player.UserId] = nil
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)``` diceroll
frail ibex
#

drumroll

#

nothing changed

#

same script

rugged lichen
#

damn

#

so

#

will it send a message though?

frail ibex
#

but its the same script

rugged lichen
#

the script has a part of its function changed

#

telling you which function is alot slower than replacing the entire script

#
local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder",player)
    leaderstats.Name = "leaderstats"

    -- Create warning stat
    local Warnings = Instance.new("IntValue",leaderstats)
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end

    Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    print("send help")
    print(player.UserId)
    print(checklist[player.UserId])
    dss:SetAsync(player.UserId, checklist[player.UserId])
    print(player.Name.." has left with warnings : "..checklist[player.UserId])
    checklist[player.UserId] = nil
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

it should send print messages

#

100%

frail ibex
#

FINALLY

#

it printed 3

rugged lichen
#

yes

#

it stopped when trying to save the data

#

i prolly did something wrong

#

i ran out of ideas

#

i guess just

#

double check game settings

#

like

frail ibex
#

alr

rugged lichen
#

i did it exactly like the documentation did it

frail ibex
rugged lichen
#

maybe allow http requests

#

just incase

frail ibex
#

slight problem i once tried to enable it

#

but i have these teleporters in my game

#

and they dont teleport if i use them

#

like this

rugged lichen
#

well

#

if it doesnt work

#

then we just disable it again

frail ibex
#

let me try it on roblox instead of roblox studio

rugged lichen
#
local checklist = {}
local dss = game:GetService("DataStoreService"):GetDataStore("warns")
local function PlayerAdded(player)
    local ds = dss:GetAsync(player.UserId)
    -- Create leaderstats folder for the player
    local leaderstats = Instance.new("Folder",player)
    leaderstats.Name = "leaderstats"

    -- Create warning stat
    local Warnings = Instance.new("IntValue",leaderstats)
    Warnings.Name = "Warnings"
    if ds then
        checklist[player.UserId] = ds
        Warnings.Value = ds
    else
        checklist[player.UserId] = 0
        Warnings.Value = 0 -- Set initial Warning value to 0
    end

    Warnings.Value.Changed:Connect(function()
        checklist[player.UserId] = player.leaderstats.Warnings.Value
    end)
end

-- Function to handle when a player leaves the game
local function PlayerRemoving(player)
    print("send help")
    print(player.UserId)
    print(checklist[player.UserId])
    local setSuccess, errorMessage = pcall(function()
        dss:SetAsync(player.UserId, checklist[player.UserId])
    end)
    if not setSuccess then
        warn(errorMessage)
    end
    print(player.Name.." has left with warnings : "..checklist[player.UserId])
    checklist[player.UserId] = nil
end

-- Connect player join and leave events
game.Players.PlayerAdded:Connect(PlayerAdded)
game.Players.PlayerRemoving:Connect(PlayerRemoving)```
#

all this will do is

#

display a fun error message

#

if it doesnt

#

then idk

frail ibex
#

hm it does teleport

rugged lichen
#

yes

#

send help indeed

frail ibex
#

fr

frail ibex
#

we need a pro scripter

#

cuz i really need this warning thingy