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

What is wrong with this script? Sorry I'm a beginner!

Asked by
Nidoxs 190
10 years ago

Its inside the "part" brick located in workspace


local function Ghostify (part) part.transparency = 0 wait (0.5) part.transparency = 0.1 wait (0.5)
part.transparency = 0.2 wait (0.5) part.transparency = 0.3 wait (0.5)
part.transparency = 0.4 wait (0.5) part.transparency = 0.5 wait (0.5)
part.transparency = 0.6 wait (0.5) part.transparency = 0.7 wait (0.5)
part.transparency = 0.8 wait (0.5)
part.transparency = 0.9 wait (0.5) part.transparency = 1 wait (0.5)

for i = 1, 5 do parent:ghostify() end


0
Do you want yhe brick to turn invisible when touched or something? bloonblaster2000 55 — 10y
0
No, when the game is run... (I'm beginner scripter so I am testing what I have learnt in a 24 minute period..) Nidoxs 190 — 10y

3 answers

Log in to vote
0
Answered by 10 years ago

What your script looked like:

local function Ghostify (part) part.transparency = 0 wait (0.5) part.transparency = 0.1 wait (0.5)
part.transparency = 0.2 wait (0.5) part.transparency = 0.3 wait (0.5)
part.transparency = 0.4 wait (0.5) part.transparency = 0.5 wait (0.5)
part.transparency = 0.6 wait (0.5) part.transparency = 0.7 wait (0.5)
part.transparency = 0.8 wait (0.5)
part.transparency = 0.9 wait (0.5) part.transparency = 1 wait (0.5)

for i = 1, 5 do parent:ghostify() end

This is as much as I can do, but I think it needs some corrections:

H = game.Workspace

local function Ghostify (Part)
H.Part.Transparency = 0
wait (0.5)
H.Part.Transparency = 0.1
wait (0.5)
H.Part.Transparency = 0.2
wait (0.5)
H.Part.Transparency = 0.3
wait (0.5)
H.Part.Transparency = 0.4
wait (0.5)
H.Part.Transparency = 0.5
wait (0.5)
H.Part.Transparency = 0.6
wait (0.5)
H.Part.Transparency = 0.7
wait (0.5)
H.Part.Transparency = 0.8
wait (0.5)
H.Part.Transparency = 0.9
wait (0.5) 
H.Part.Transparency = 1
wait (0.5)
for i = 1, 5 do Parent:ghostify()
end
0
Line 26 highlighted in red? D: Nidoxs 190 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

I think..

if workspace:FindFirstChild("Part")then
for i=1,workspace.Part,0.5 do
workspace.Part.Transparency=workspace.Part.Transparency+i 
end
else
print("Part doesn't exist")
end
Log in to vote
-3
Answered by
Prioxis 673 Moderation Voter
10 years ago

Transparency needs to be capitalized so does Wait and Parent and part if it is capitalized when spelt in the workspace

0
Wait is not supposed to be capitalized. bloonblaster2000 55 — 10y

Answer this question