local Players = game:GetService("Players")
local TouchPart = workspace["Part"] -- assign a part to it
TouchPart.Touched:Connect(function(touched)
if touched.Parent:IsA("Model") and touched.Parent:FindFirstChild("Humanoid") then
local Player = Players:GetPlayerFromCharacter(touched.Parent)
if Player then
-- do something here
end
end
end)