For one of my games I'm trying to make text appear then disappear after around 6/7 seconds The code doesn't seem to be working (probably because I don't have much coding knowledge)
Any ideas?
code:
`local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player:LoadCharacter()
if Players.PlayerAdded then
script.Parent.TextLabel.TextTransparency = 1
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.9
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.8
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.7
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.6
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.5
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.4
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.3
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.2
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.1
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0
wait(5)
script.Parent.TextLabel.TextTransparency = 0.1
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.2
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.3
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.4
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.5
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.6
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.7
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.8
wait(0.001)
script.Parent.TextLabel.TextTransparency = 0.9
wait(0.001)
script.Parent.TextLabel.TextTransparency = 1
wait(0.001)
end
end)`

2 comments
May I know whether it is a Local script or a normal script, also where the script is located. And where's you text label is located
"if Players.PlayerAdded then" what does this do?