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

How do I make a script that will make my part go visible to not visible?

Asked by
pevdn 32
3 years ago

I'm trying to make a part that will go transparent and then go visible again.. Whats wrong with it?

while true do
    script.Parent.Transparency = 0
    wait(1)
    script.Parent.Transparency = 1
end
0
This should work. If you have put the script in the part WideSteal321 773 — 3y
0
It is in the part.. But it aint working.. pevdn 32 — 3y
0
nothing's wrong. krowten024nabrU 463 — 3y
0
Errors? User#30567 0 — 3y
View all comments (2 more)
1
Local or server script? WideSteal321 773 — 3y
0
while true do wait(1) script.Parent.Transparency = 0 wait(1) script.Parent.Transparency = 1 end Newh0hrizonCz 58 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

I tested your original script and it really did not work so you need to add one more wait

while true do
    wait(1)
    script.Parent.Transparency = 0
    wait(1)
    script.Parent.Transparency = 1
end

and if you want to start with transparency 0 first, then you will have to set the part's transparency to 1 first, or you can use this script below

while true do
    script.Parent.Transparency = 1
    wait(1)
    script.Parent.Transparency = 0
end

Ad
Log in to vote
0
Answered by 3 years ago

The script you should be using should be a server script inside ServerScriptService. Here is the code you should put in

while true do
    wait(1)
    workspace["YourPart"].Transparency = 1
    wait(1)
    workspace["YourPart"].Transparency = 0
end

Answer this question