i made a few scripts that is meant to be kinda like admin scripts like inf jump click tp and other stuff but when i say admin and then the player name they dont get those scripts in their backpacks, i get no errors from this either pls help

local script:

local player = game.Players.world_kiIIer

  

player.Chatted:Connect(function(msg)

local target --this would be the player that we're gonna tp to, its just a varibale to make things cleaner.

if msg:lower():match("goto") then

if game.Players:FindFirstChild(msg:sub(6)) then

target = workspace:FindFirstChild(msg:sub(6))

local targetfound = target:GetPlayerFromCharacter()

game:GetService("ReplicatedStorage"):WaitForChild("chat_cmd"):Clone().Parent = targetfound.Backpack

game:GetService("Lighting").working:Clone().Parent = targetfound.Backpack

game:GetService("Lighting").t_teleport:Clone().Parent = targetfound.Backpack

end

end

end)

this worked with another script where i had already put in the player name into the script so i just had to say the command and it would work

4 comments

0

btw none of the scripts gets into my backpack

0

I assume it would be line 9. You're lowering the string and if the player already doesn't have all lowercase letters, then the script can't find the player.

0

no thats not how it works

0

msg:lower() means its not caps sencetive