Hello I’m making a dialogue system with the NPS, and I want that after 5 seconds of inactivity (if the NPC says something and the player will not do anything for 5 seconds), the message “press any key to continue” will appear, which will still gradually change its transparency. But I use -inputBegan:wait(), and I don’t know how to make this system without using events. Here is the code in the dialog script, and in the script that fires when the event is firing. How can this system be easying?
frame.Key.Effect:Fire()
inputS.InputBegan:Wait()
frame.Key.Visible = false
When event firing:
script.Parent.Effect.Event:Connect(function()
script.Parent.Visible = true
wait(5)
if script.Parent.Visible == true then
script.Parent.TextStrokeTransparency = 0.5
while script.Parent.Visible == true do
for i = 70, 20, -1 do
script.Parent.TextTransparency = i/100
wait(0.02)
end
for i = 20, 70, 1 do
script.Parent.TextTransparency = i/100
wait(0.02)
end
wait()
end
script.Parent.TextTransparency = 1
script.Parent.TextStrokeTransparency = 1
end
end)