There is a basketball for a roblox basketball game, the steal script works fine, but the problem is my own teammate is stealing the ball. How can I stop my teammate from stealing the ball but allow the enemy team to steal it? Location: http://prntscr.com/jnq732
function onTouched(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
script.Parent.Parent=workspace
wait()
script.Parent.Parent=hit.Parent
script.Disabled = true
wait(2.5)
script.Disabled = false
end
end
script.Parent.Handle.touched:connect(onTouched)

3 comments
Well thanks, but I cannot store player names because it's a public game with two teams of random players. And the HandValue is a Number Value, but I appreciate the help. I don't know what I should do at this point. hmmm
Maybe you could use a RemoteFunction getting the two teams and it's players
When the game is picking the teams and who is on it, you could use a remote function to get the team and the team in it