So here is the script tryed to make it where I want ONLY a person that can have it.
local isAdmin = {["dog6779"] = true, ["DutchCoder"] = true} -- to add more players just do this for example local isAdmin = {["NAME"] = true} make sure to add the , at the end then space and do the same game.Players.PlayerAdded:connect(function(player) if isAdmin[player.Name] then while true do game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) local trail = game.ServerStorage.Trail:Clone() trail.Parent = char.Head local attachment0 = Instance.new("Attachment",char.Head) attachment0.Name = "TrailAttachment0" local attachment1 = Instance.new("Attachment",char.HumanoidRootPart) attachment1.Name = "TrailAttachment1" trail.Attachment0 = attachment0 trail.Attachment1 = attachment1 end) end)
So how can I make it where it's just the person?
And here the photo's what I am doing.
https://gyazo.com/2f0b9a6463d43b58928df929a0511755
Instead of using that, I would just loop through the table and check if it contains the player who joined.
local admins = {"dog6779", "DutchCoder"} game.Players.PlayerAdded:connect(function(player) if isAdmin(player.Name) then while true do game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) local trail = game.ServerStorage.Trail:Clone() trail.Parent = char.Head local attachment0 = Instance.new("Attachment",char.Head) attachment0.Name = "TrailAttachment0" local attachment1 = Instance.new("Attachment",char.HumanoidRootPart) attachment1.Name = "TrailAttachment1" trail.Attachment0 = attachment0 trail.Attachment1 = attachment1 end) end) end end end) function isAdmin(username) for i,v in pairs(admins) do if v == username then return true end end return false end