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 😭
#Touch dialogue fade out effect
1 messages · Page 1 of 1 (latest)