function startconvo()
print("conversation started")
char.Humanoid.WalkSpeed = 0 --freeze player
char.HumanoidRootPart.Anchored = true
readoptions(script.Greeting) --generate table of all options
convogui.Parent = script.Parent --show the gui
chat(script.Greeting.Value) --display greeting
local options = script.Greeting:GetChildren()
wait(displaytime)
makebuttons(options) --generate buttons
end
--end conversation
function endconvo()
print("conversation ended")
--clean up options
for i,v in pairs(convogui.Frame.Selections:GetChildren()) do
v:Destroy()
end
wait(displaytime)
convogui:Destroy() --remove the gui
char.Humanoid.WalkSpeed = 16 --unfreeze player
char.HumanoidRootPart.Anchored = false
sound:Destroy() --remove the sound
end
--==========have a conversation
startconvo()
this portion here is incharge of starting the convo and ending it, this is at the end of the script, and generally after the "converstaion ended" for one NPC, it doesnt work for another NPC, it only works once for only one NPC, after that you cannot start a conversation with any other NPC? Any reason why?
no logs or anytihng to show an error.
