#Touch dialogue fade out effect

1 messages · Page 1 of 1 (latest)

buoyant nimbus
#
local player = game.Players.LocalPlayer
local text = player.PlayerGui.ScreenGui.TextLabel
local canhit = true


touchpart.Touched:Once(function(hit)
    if canhit ==  true then
        if hit and hit.Parent:FindFirstChild("Humanoid") then
            text.Visible = true    

        end
    end
end)

local message = "Hello"
touchpart.Touched:Once(function(hit)
    if canhit ==  true then
        local typeSpeed = 0.05
        if hit and hit.Parent:FindFirstChild("Humanoid") then
            for i = 1, #message do
                text.Text = string.sub(message, 1, i)
                task.wait(typeSpeed)
            end
        end
    end
end)

touchpart.Touched:Once(function(hit)
    if canhit == true then 
        local fadeTime = 1
        local steps = 20
        local stepDelay = fadeTime / steps
        if hit and hit.Parent:FindFirstChild("Humanoid") then
            for i = 1, steps do
                message.TextTransparency = i / steps
                task.wait(stepDelay)
            end
        end
    end
end)```
fade out effect doesnt work at all the text doesnt even show 😭
native ginkgo
#

Your message is a string isnt it

#

You cant use TextTransparency on a string

buoyant nimbus
#

what

#

oh uh wait let me try

#

yea still doesnt work

#

tf

#

it works sometimes and sometimes it doesnt