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

In this code it adds the player who spoke this command to the list but i don't know why?

Asked by 6 years ago

This is the code:

if msg:sub(1,5) == 'home/' then local commandfilter = msg:sub(6) local playerpick = '%w' for players in commandfilter:gmatch('%w')do local victim = findPlayer(players) local lastvictim = nil if victim and victim.Name ~= lastvictim then print(victim) lastvictim = victim.Name table.insert(pic,victim.Name) end end for i,v in pairs(pic) do table.remove(pic,pic[#v]) game.Players[v].TeamColor = BrickColor.new('Really black') game.Players[v].Character.Humanoid.Health = 0 end end

However, I never added the original speaker to this. But for some reason if you home someone it adds the speaker.

Ex: home/user1

it'll home you and user1.

0
Could you please explain what you're trying to do? What's wrong with the code presented? What do you mean by "I never added the original speaker to this"? TheeDeathCaster 2368 — 6y

Answer this question