#Why does this only activate once?

1 messages · Page 1 of 1 (latest)

twilit prism
#

it works well, but when I try doing it again it doesnt go visible

#

for some reason

agile sky
#

what if you try changing InputBegan:Connect(...) to InputBegan:Once(...)?

twilit prism
#

i don't think that would change anything since

#

i want it to be able to be triggered multiple times

#

but when i do it doesn't appear this time

agile sky
#

also you should probably do something like

local closed = false
uis.InputBegan:Once(function(input)
  if input.UserInputType == Enum.UserInputType.MouseButton1 then
    -- your existing code
    closed = true
  end
end)
repeat task.wait() until closed
twilit prism
#

everything goes well except the visibility

agile sky
#

using Once in that specific scenario still connects it each time its triggered since the function "startdialogue" still runs each time its triggered, also you should be using input.UserInputType not input.KeyCode

twilit prism
#

the userinputtype

#

didnt even notice i put it wrong

agile sky
#

ok nice

twilit prism
#

thank you