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

What's wrong with this script?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

local Brick = script.Parent

function Brick.Transparency = (0) wait(.5) Brick.Transparency = (1) end

1 answer

Log in to vote
4
Answered by
Relatch 550 Moderation Voter
8 years ago

The problem is that you never call or name your function. To fix this, just do something like "function RandomFunction()", and then you also need to call your function. But you can do this 2 ways.

1:

local Brick = script.Parent

function RandomFunction() --make sure to name your function.
    Brick.Transparency = 0
    wait(.5)
    Brick.Transparency = 1
end

RandomFunction() --make sure to call your function, otherwise it won't do anything!

2:

--You can not use a function, and it will work the same way.
local Brick = script.Parent

Brick.Transparency = 0
wait(.5)
Brick.Transparency = 1

PS: Use codeblock next time when posting scripts.

0
Or... He can keep the end and replace the "function" with "do". Would that work? EzraNehemiah_TF2 3552 — 8y
Ad

Answer this question