Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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


2 comments

0

Do you want yhe brick to turn invisible when touched or something?

0

No, when the game is run... (I'm beginner scripter so I am testing what I have learnt in a 24 minute period..)

3 answers

✓ Accepted answer

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

1 comment

0

Line 26 highlighted in red? D:

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

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

1 comment

0

Wait is not supposed to be capitalized.

This discussion is preserved as it was. New answers, comments, and votes are closed.