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

Why is this decal script not working???

decal = game.Workspace.DecalPicture.Decal

decalID = game.Workspace.DecalPicture.Decal.Texture

decal.decalID = "http://www.roblox.com/Decal-item?id=136313358"

if decal.decalID == false then
	print("There is something wrong with the decal")
end

It says Line 1 is wrong. It's suppose to be like a decal script. It's suppose to show the ID. but, it doesn't. Why?

P.S (decal is named, which is line 1)

1 answer

✓ Accepted answer

In line two, you already set 'decal' as a variable, so you can shorten it.

decal = Workspace.DecalPicture.Decal --Shortened.

decalID = decal.Texture --decal is already defined.

decalID = "http://www.roblox.com/asset/?id=136313358"

if decal.decalID == false then --Everything here on was correct.
    print("There is something wrong with the decal")
end

Line 3: Lua would've read it as "game.Workspace.DecalPicture.Decal.game.Workspace.DecalPicture.Decal.Texture" since you placed two variables that are basically the same.

If you have any other questions, feel free to inbox me.

~Kyo-chan

1 comment

0

Ohh! I get it! Thanks so much!!

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