Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What would I use to check if something inside a model was touched?

Asked by 3 years ago

As the title says, is there a certain function or event I could use to check if a player had touched a certain part of a model?

0
Have you ever heard of .Touched? rabbi99 714 — 3y
0
Can you explain in detail please? XLeMysterioX 22 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Okay from what I understood from the problem, here is the solution

--This is a simple code which check whether a player touched a part or not.
local Part = Instance.new("Part", workspace)
Part.Touched:Connect(function(hit) -- .Touched is the answer.
print(hit + "touched the part")
end)
0
Ok thank you GooseStranger 27 — 3y
Ad

Answer this question