Hi, I have a tag game and the script that I use just does not work at all. It prints the player but the script just won't break joints. The tagger team color is "Really Red"
script.Parent.Handle.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) print(player) if player and not player.TeamColor == BrickColor.new("Really red") then hit.Parent:BreakJoints() end end)
PLEASE HELP!
Super simple fix. Instead of doing all of that, you can just easily kill the player.
Code:
local Handle = script.Parent.Handle --reference variable for the handle local Player = game.Players.LocalPlayer --reference variable for your player Handle.Touched:Connect(function(Hit) --if the handle gets touched, assign the touched thing to Hit local Humanoid = Hit.Parent:FindFirstChild("Humanoid") --sets Humanoid equal to the humanoid Humanoid.Health = 0 --sets the humanoid health to 0, if touched if Hit.Parent == Player then --if the parent is your localplayer, then (basically so it doesnt kill you) return --return, which basically ignores everything else, and reruns end end)
I tested this, and it worked. Hopefully you understand the code, and have a good day.
Have you tried to put the Humanoid's health to 0?