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

How do I make a tool change a team?

Asked by 3 years ago

Hello there, so I am making a infection game. I have a tool that is given to you when you get infected, and it lets you infect others. But when I try infecting people, they don't become infected

-- Infected is how I tell it to turn you infected, when its 1, your infected, when its 0, ur a survivor.

script.Parent.Handle.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        hit.Parent.Infected.Value = 1
    end
end)

There is the code I am using

Thanks for your help!

Answer this question