Just connect your code to a Touched event. Example:
local part = workspace.Part -- the part you want to be touched
part.Touched:Connect(function(hit)
-- code here
end)
Just connect your code to a Touched event. Example:
local part = workspace.Part -- the part you want to be touched
part.Touched:Connect(function(hit)
-- code here
end)