Team Kill script

Hello, my name is Kyle and I am trying to become a scripter, but I am stuck on a script Yes, it’s easy. But what I want to do is make a script that everyone can’t team kill but a certain group I have an idea on how to do this. But I don’t think it’s right. Here is what I have:

local groupId = 7395531
local minimum rank = 1

if Player:GetRankInGroup(groupId) >= minimumRank then
(Trigger for team-kill) function() 
  else)
 (Anti-Team kill script) 
  end) ```

I am not sure how to trigger the Team kill script or the Anti-Team kill script. And I had already looked for it on the Forum.



Thank you.

You could dis/enable the scripts via their Disabled property, but that is quite a weird way to go about it. Are you trying to enable team kill for specific players? I would recommend checking for the group rank inside your teamkill script and denying/allowing the team kill via that

Alright so, basically it’s a Military type game and we have a group called Sultans Guard (They guard the king) and to be able to guard we need to be able to have them to team kill. So I am trying to make any one in the SG group be able to TK, and no one else. But I am just a beginner, and I don’t know where to start to disable the team kill.

Well, you need to understand that first before you think about the implementation. I’d suggest looking at youtube tutorial and then if you still wonder how to implement it, then post here again. Good luck;)