![]() ![]() If d.Value ~= "" then - I check if the value is not = "" so it actually got changed and someone killed the player ( the player wasn't killed by nothing / reset) Player.TeamColor = - First we team them to the dead team (i do that idk about you) Player.CharacterAdded:Connect(function() - When the player's character is added we check : Local d = Instance.new'StringValue' - Create the StringValue which we'll change the value of it to the Killers name.ĭ.Parent = Player - Parent it to the player soo it doesn't get destroyed or whatever. Players.PlayerAdded:Connect(function(Player) - Players = game:GetService('Players') ![]() Let me show you how I do it -This is in a server script of course. You should also handle this on server obviously. You are wrong, an exploiter can modify anything on their client, but cannot modify anything when it comes to other player’s clients so it cannot be exploited. ![]() If tostring(currentIgnore) = tostring(playerName) then :Fire(tag.Value, 1)Ĭode outside the touched function: local ignore = Table.insert(ignore, pos, tostring(playerName)) ![]() Local playerName = game.Players:GetPlayerFromCharacter(humanoid.Parent).Name Already ran checks on the hit/defined all the variables: if humanoid.Health <= 0 then I get no errors, but it just doesn’t work.Ĭode in a touched function (for the projectile). On another note, are there any better ways to do it?Īll the code is in a script, not a localscript. Problem is it didn’t work and I can’t seem to find a fix. I tried adding the player’s names to a table and have the function ignore a player with their name in the table. Problem is they have to be able to kill more than one player so there needs to be a cooldown time for only once they have killed a certain player. But I want to make it so that if they keep hitting then while dead, they get no more points. I’m trying to check if a tool killed a player, if so give them a point. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |