What do you want to achieve? I’m trying to make a part detect if a player is standing on it and if it does it needs to change the team and respawn the player.
What is the issue? It doesn’t detect the parts of the character.
What solutions have you tried so far? I’ve tried looking on the Developer Hub for solutions, but I didn’t find anything.
This is the Server Script: (Not the complete version, only the important part)
game.ReplicatedStorage.FourCorners.OnServerEvent:Connect(function(player, killColor)
if killColor == "Green" then
print("killColor is Green")
local parts = game.Workspace.ActiveMaps.FourCornersMap.Green:GetTouchingParts()
for _, touchingPart in ipairs(parts) do
print("Part")
if touchingPart.Parent:FindFirstChild("Humanoid") then
print("Part is a character")
local player = game.Players:GetPlayerFromCharacter(touchingPart.Parent)
player.TeamColor = BrickColor.new("White")
player:LoadCharacter()
end
end
end
Yep that is supposed to happen. Get touching parts only accounts for CanCollide parts. The legs and arms have collisions disabled, so they aren’t accounted for. I personally use Region3, if my region doesn’t need to rotate or move, since you can’t do that with a Region3, and since it does account for parts without collisions.
As @incapaxx mentioned the players arms and legs have CanCollide disabled, luckily buildthomas made a function for getting touching non cancollide parts