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

Why is this not working?

Im trying to make it to where if a brick doesn't move then it turns invisible but if it does it isn't invisible

Can you help???

local brick = script.Parent
if brick then
	local move = brick.Position + 1
	if not move then
		brick.Transparency = 1
	else
		brick.Transparency =0
	end
end

1 answer

Okay, I'm young and not the best scripter so sorry if I'm wrong.

"if brick then" I think you have to literally say something about the brick like

if brick.BrickColor = "Bright red" then (code) end

Also, local move = brick.Position + 1

I think you have to do local move = brick.Position.Y +1 Y could be Y, Z, or X depending on which direction your saying it would move in.

2 comments

0

Woops, if brick.BrickColor = "Bright red" then (code) end should have two equals sign like if brick.BrickColor == "Bright red" then (code) end

0

No see the brick is in a local "local brick= script.Parent" meaning the brick stands for script.Parent and if it is script.Parent then there would be a code.

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