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
And this is the Local Script:
script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.FourCorners:FireServer("Green") end)
And here is a video of the issue: