part1 = game.Workspace.Part
if true then
part1.Transparency = 0
wait(2)
part1.Transparency = 1
end
Errors: No errors
Prob something simple but just curious on why it only works once as this happened to me a couple times before.
part1 = game.Workspace.Part
if true then
part1.Transparency = 0
wait(2)
part1.Transparency = 1
end
Errors: No errors
Prob something simple but just curious on why it only works once as this happened to me a couple times before.
An if statement will only ever happen once unless told otherwise, for this you will need to use a loop, for example if you were to use a while true do loop like this:
while true do
wait(1) -- wait 1 sec
part1 = game.Workspace.Part
if true then
part1.Transparency = 0
wait(2)
part1.Transparency = 1
end
end
Then that would repeat every second, a wait is ALWAYS required with a while true do loop as otherwise your game will simply crash.
ACCEPT THIS IF IT HELPED!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
If statements only work once, a simple loop could resolve your answer
you can try while true do