Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this not work?

Asked by 10 years ago
Script.Parent.Touched:connect(function(otherPart)

    Script.parent.Part.Transparency = 1
    wait(0.1)
    Script.parent.Part.Transparency = 0.9
    wait(0.1)
    Script.parent.Part.Transparency = 0.8
    wait(0.1)
    Script.parent.Part.Transparency = 0.7
    wait(0.1)
    Script.parent.Part.Transparency = 0.6
    wait(0.1)
    Script.parent.Part.Transparency = 0.5
    wait(0.1)
    Script.parent.Part.Transparency = 0.4
    wait(0.1)
    Script.parent.Part.Transparency = 0.3
    wait(0.1)
    Script.parent.Part.Transparency = 0.2
    wait(0.1)
    Script.parent.Part.Transparency = 0.1

    wait(3)

    Script.parent.Part.Transparency = 0.1
    wait(0.1)
    Script.parent.Part.Transparency = 0.2
    wait(0.1)
    Script.parent.Part.Transparency = 0.3
    wait(0.1)
    Script.parent.Part.Transparency = 0.4
    wait(0.1)
    Script.parent.Part.Transparency = 0.5
    wait(0.1)
    Script.parent.Part.Transparency = 0.6
    wait(0.1)
    Script.parent.Part.Transparency = 0.7
    wait(0.1)
    Script.parent.Part.Transparency = 0.8
    wait(0.1)
    Script.parent.Part.Transparency = 0.9
    wait(0.1)
    Script.parent.Part.Transparency = 1

end)

???

2 answers

Log in to vote
-2
Answered by 10 years ago

It should be in a While True Do loop so it will look like this:

while true do
wait(0.1)

Script.parent.Part.Transparency = 1 

wait(0.1) 


Script.parent.Part.Transparency = 0.9 

wait(0.1) 


    Script.parent.Part.Transparency = 0.8 


     wait(0.1) 


     Script.parent.Part.Transparency = 0.7 


     wait(0.1) 


     Script.parent.Part.Transparency = 0.6 


    wait(0.1) 


    Script.parent.Part.Transparency = 0.5 


     wait(0.1) 


     Script.parent.Part.Transparency = 0.4 


    wait(0.1) 


Script.parent.Part.Transparency = 0.3 


wait(0.1) 


Script.parent.Part.Transparency = 0.2 


wait(0.1) 


Script.parent.Part.Transparency = 0.1 





wait(3) 





Script.parent.Part.Transparency = 0.1 


wait(0.1) 

Script.parent.Part.Transparency = 0.2 


wait(0.1) 


Script.parent.Part.Transparency = 0.3 


wait(0.1) 


Script.parent.Part.Transparency = 0.4 


wait(0.1) 


Script.parent.Part.Transparency = 0.5 


wait(0.1) 


Script.parent.Part.Transparency = 0.6 


wait(0.1) 


Script.parent.Part.Transparency = 0.7 


wait(0.1) 


Script.parent.Part.Transparency = 0.8 


wait(0.1) 


Script.parent.Part.Transparency = 0.9 


wait(0.1) 


Script.parent.Part.Transparency = 1 





end) 

0
Sorry for the lack of spaces in the script. digitalzer3 123 — 10y
0
Ok, lol. I'll try it InsideExotic 5 — 10y
0
Also if it dosent work, ignore it. digitalzer3 123 — 10y
0
No it worked :D InsideExotic 5 — 10y
View all comments (2 more)
0
Kk. digitalzer3 123 — 10y
0
Accept answer if you want. digitalzer3 123 — 10y
Ad
Log in to vote
1
Answered by
Lacryma 548 Moderation Voter
10 years ago

This is more efficient and more of what you originally wanted.

script.Parent.Touched:connect(function(otherPart)
for i = 1, 0.1 do
    script.Parent.Part.Transparency = i
    wait(0.1)
end
    wait(3)
for i = 1, 0.1 do
    script.Parent.Part.Transparency = i
    wait(0.1)
end
end)

Answer this question