Your saying touch a npc and dialogue appear?
If yes, put a invisible part on npc (without anchor true and cancollide off) with a clickdetector
In your dialogue gui put a script that make, when click on npc clickdetector, the gui turn visible.
I would suggest making an invisible part like rtvr but do a .Touched event on it, and turn the gui visible.
Just make a region detect if player is in the region or make a part if player touched it show a gui frame with the text
You can do what the others said by adding an invisible part to detect players, so what you would do is
- Create a part
- Resize it however you want
- Set CanCollide to false
- Set Transparency to 1
- Set Anchored to true
- Position it on the NPC
Now you will detect if a player touches the part by doing this in a localscript:
local NPCDetectPart = game.Workspace.NPCDetectPart
local dialogDebounce = false
NPCDetectPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and dialogDebounce == false then
if game.Players:FindFirstChild(hit.Parent.Name) then
dialogDebounce = true
-- Insert your code here which starts the dialog
end
end
end)
But how can I do so that I can add a image, and then add a script to the studio so that he writes what he says
You’re going to have to create a ScreenGui and put it inside StarterGui.
Then you will have to make the dialog design by yourself by using Frames, ImageLabels, TextLabels, and many more.
Then you will have to research by yourself how to make a typewriting effect for the dialog if you would like the text to be like the video you sent.
Also please mark a post as Solution if your problem has been solved xD