#I NEED HELP WITH FIXING MY DIALOG SYSTEM

1 messages · Page 1 of 1 (latest)

boreal dagger
#

for some reason the code i wrote was working before i saved it and when i published it a tester said the dialogs dont work. and now they are broken ):<

#

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local DialogModule = require(ReplicatedStorage.DialogModule)

local player = game.Players.LocalPlayer
local npc = script.Parent -- Reference to the NPC model
local npcGui = npc:WaitForChild("Head"):WaitForChild("gui")
local prompt = npc:WaitForChild("ProximityPrompt")

local dialogObject = DialogModule.new("Owner", npc, prompt)
dialogObject:addDialog("hello. im the owner. nice to meet you player.", {"Nice to meet you too!", "goodbye."})
dialogObject:addDialog("well player, what is it you request from me?", {"How do i play?", "I want to support you and your game!"})
dialogObject:addDialog("Oh! thank you so much! Go to the tip jar to donate!", {})

prompt.Triggered:Connect(function(player)
dialogObject:triggerDialog(player, 1)
end)

dialogObject.responded:Connect(function(responseNum, dialogNum)
if dialogNum == 1 then
if responseNum == 1 then
dialogObject:triggerDialog(player, 2)
end
if responseNum == 2 then
dialogObject:hideGui("...")
end
end
if dialogNum == 2 then
if responseNum == 2 then
dialogObject:triggerDialog(player, 3)
end
if responseNum == 1 then
dialogObject:hideGui("You and your Friends play 'the fox and the hounds',", dtrue)
wait (3)
dialogObject:hideGui("If you want to learn how to play the fox and the hounds. check the discription of this game and click on the youtube video!',")
wait (8)
dialogObject:hideGui("Enjoy the game!")
end
end
end)

is the code btw

boreal relic
#

is this a normal script or a local script

lost lichen
#

write it so it works

boreal relic
#

answer the questiom

#

n

#

i guess this is a local script

#

if not try making it a local script

lost lichen
#

make it formatted

#

in lua

boreal relic
#

im sorry but i cant help u

boreal dagger
boreal relic
#

i didint know that dialoguescripts existed

frosty oakBOT
#

studio** You are now Level 5! **studio

boreal relic
#

yey

#

im lvl 4

#

5

#

finally

boreal dagger
#

its a normal script