I already made a script but sometimes the part stuff freezes and idk why
script.Parent.Pad1.Pad1.TouchEnded:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player1.Value ~= nil then
local s = true
local partsinregion = game.Workspace:FindPartsInRegion3WithWhiteList(region, {plr.Character["HumanoidRootPart"]}, 100)
for i,v in pairs(partsinregion) do
s = false
end
if s == true then
script.Parent.Pad1.Pad1.Color = Color3.fromRGB(163, 162, 165)
script.Parent.Pad1.Pad1.Material = "Plastic"
Player1.Value = nil
else
s = true
end
end
end)