When a player walks over this part (In workspace) the part wouldn't change the value of a BoolValue.
Important facts: Filtering enabled ~ On API services ~ on Type of script ~ script the part is a child to workspace
Here is the script:
function OnTouch(hit)
if hit then
local player = nil
-- Checking to see if the part that hit it is a character
if hit.Parent:FindFirstChild("Humanoid") then
player = game.Players:GetPlayerFromCharacter(hit.Parent)
-- Special case where a hat hits the spawn rather than a limb
elseif hit.Parent.Parent:FindFirstChild("Humanoid") then
player = game.Players:GetPlayerFromCharacter(hit.Parent.Parent)
end
-- If a player was found through all the checking we did prior to this
if player then
player.IsInMatch.Value = false
end
end
end
local Spawn = script.Parent -- no need for FindFirstAncestor
Spawn.Touched:Connect(OnTouch)
Why doesn't the value change???

1 comment
player:WaitForChild("IsInMatch") or player:FindFirstChild("IsInMatch")