How do I create a talking NPC dialogue system?

I have no idea how to script, could you help?

1 Like

Server script

-- Suomea hetki

local Remote = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local Bool = false

-- Something that triggers.. Example :

-- Part.Touched:Connect(function(hit) --(if using part)
-- ProximityPrompt.Triggered:Connect(function(player) --(if using prompt)

Remote:FireClient(players argument, Bool)

end)

Localscript

local Remote = game.ReplicatedStorage:WaitForChild("RemoteEvent")

Remote.OnClientEvent:Connect(function(Bool)
    if Bool == true then
         -- something about dialogue here (cloning UI, talking, etc...
    end
end)

-- Siellä on koodini :)