Answered by
4 years ago Edited 4 years ago
Let's think about how we could do this logically. What we need to do is go through all the players, and check if they have an IsHunter value inside of their character.
To loop through all the players, you can use a for loop, like this:
1 | local players = game:GetService( 'Players' ) |
2 | for _,v in ipairs (players:GetPlayers()) do |
The code above will print all the player's names. Cool! We now know how to loop through all players. Now, to check if they have an IsHunter object in their Character, we can simply do the following:
1 | local players = game:GetService( 'Players' ) |
2 | for _,v in ipairs (players:GetPlayers()) do |
3 | if v.Character:FindFirstChild( 'IsHunter' ) then |
4 | v.Character:SetPrimaryPartCFrame(yourCframeHere) |
Now all you need to do is replace yourCframeHere with the destination and it should work.
Hope this helped