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

How do i make a script for admin commands? [closed]

Asked by 5 years ago

I tried youtube videos and still wouldnt work so i copied one and still didnt work.

v Code v

local List = "DevelopingUnlimited"
local Prefix = ":"
game.Players.PlayerAdded:connect(function(userJoined)
userJoined.Chatted:connect(function(Message)
Message = string.lower(Message)
-- This is the first block of code for the first command
if Message:sub(1,5) == "kill"..Prefix and List[userJoined.Name] then
if Message:sub(6) == "me" then Target = userJoined
else Target = FindPlayer(userJoined)
end 
if Target and Target.Character then
Target.Character:BreakJoints()
end end end)end)

game.Players.PlayerAdded:connect(function(userJoined)
userJoined.Chatted:connect(function(Message)
Message = string.lower(Message)
if Message:sub(1,3) == "ff"..Prefix and List[userJoined.Name] then
if Message:sub(4) == "me" then Target = userJoined
else Target = FindPlayer(userJoined)
end
if Target and Target.Character then
local ForceField = Instance.new("ForceField", Target.Character)
end end end)end)?
0
You should have a basic understanding of how to create an admin script, or at least know what the code you are copying does and how it works. trecept 367 — 5y

Closed as Not Constructive by theCJarmy7, LateralLace, and User#19524

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?