Hi,
I made this dialogue script the player talk to a npc through GUI then the player pick his/her choices. I found this topic where it detects if player click button twice or more
here is the topic How to check if a player clicked with their mouse twice? - #12 by NucleiEye .
I did what exactly said in the solution script but from some reason the NPC repeats it’s line twice. I made a simple script to test out if the script works( the topic I found ) it worked perfectly.
also here is my script:
if clicks == 1 then
print("Test1")
bg2.Visible = false
TypeWriter.typeWrite(DialougeText, "I'm doing good " .. player.Name .. " , How about you?")
wait(3)
bg2.Visible = true
A1.Text = "Im also doing good too!"
end
if clicks >= 2 then
print("Test2")
bg2.Visible = false
TypeWriter.typeWrite(DialougeText, "Oh really?")
wait(2)
TypeWriter.typeWrite(DialougeText, "Anyway, It's been along time since we last met ey?")
wait(3)
TypeWriter.typeWrite(DialougeText, "and also wanna meet up in my place?")
wait(3)
bg2.Visible = true
A1.Text = "Sure!"
end
if clicks >= 3 then
print("Test3")
bg2.Visible = false
NameText.Text = player.Name .. " Mind"
TypeWriter.typeWrite(DialougeText, "Then I went to his place and play video games")
wait(3)
TypeWriter.typeWrite(DialougeText, "After that it was really dark so I went home")
wait(3)
TypeWriter.typeWrite(DialougeText, "We were having fun we talk about our past and have some fun")
wait(3.5)
TypeWriter.typeWrite(DialougeText, "I hope we can meet up again")
wait(3)
TypeWriter.typeWrite(DialougeText, "Thanks Noob for being my friend when I first join Roblox...")
wait(3.5)
player:Kick("You got the good ending B) --Creator")
end
end)
A1 means the first choice
bg2 - there are 2 choices for the player to pick it consist the A1 and the A2 bg2 is the background of the both
The problem : the dialogue 2 ( the one who has if click >=2 then
)
repeats twice when it’s the third click.
I added prints to check it out Test 2 repeats