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

What's wrong with this script?

local Brick = script.Parent

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

1 answer

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.

1 comment

0

Or... He can keep the end and replace the "function" with "do". Would that work?

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