Which Function do I Use

I want to make a GUI dialogue where you walk up to a person and he starts talking. I’ve tried looking for an answer, but I haven’t found any. My best guess is the “script.Parent.Touched” function. Can any of you brilliant programmers help me?
Sincerely,
ParkCityUSA

Looks like you’re using a part to detect when a player walks up, so yes, the Touched event is what you’re looking for.

Related Resources:

Touched
TouchEnded

2 Likes

Would the code be this?
script.Parent.Touched: connect(function(hit)

script.Parent.Touched:Connect(function(hit)
   -- code here
end)
1 Like

I just wondered; would the hit function take damage away? I want to activate a GUI.

no, unless you code it to do that

1 Like

Ok, thank you! Have a good day!

1 Like