Trouble changing teams with part

so tell me… is there a event the fires when you stop touching the part?

The TouchEnded, fires when a part stops touching another part.

What Fimutsu is saying is that, if you use TouchEnded on the baseplate, every time you walk, and the animation lifts your feet, it will fire TouchEnded events every time your foot leaves the part, because your foot and the baseplate are not touching anymore.

You could of course also use teamcolor instead of setting the team.

:+1: Exactly what SelDraken Explained so what i’m saying is :
Keep the same script , Create a Huge part that covers the entire prison → turn CanCollide Off → make it Transparency = 1 and put the script in it

im back, and ill try that, the problems been solved but that can help make it better.
also:
me after realizing that a problem that i have been trying to solve for days was because i used .touchended not knowing what it actually does:

sorry for the jumpscare

anyways the problem is solved now i will delete this topic soon

oh ye one more thing:
how do you make a part hollow?

i just finnally relized this post was the solution all along

Hollow as in Box ? If so then :
Create a part → duplicate it → resize the second part to make it a bit smaller using Ctrl+Shift+Resizing with mouse → Negate the second part → select the two and union them.
If otherwise you mean just being able to pass through it just turn CanCollide off

1 Like

if anyone was wondering what the solution was it was this:

part.TouchEnded:connect(function(SwitchTeams)
	if SwitchTeams.Parent:FindFirstChild("Humanoid") then
		local PlayerTeam = game.Players:GetPlayerFromCharacter(SwitchTeams.Parent)
		if PlayerTeam.Team == game.Teams.red then
			PlayerTeam.Team = game.Teams.blue
		end
	end
end)

all that u have to change is the part to an invisible region

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.