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

Why isn't this changing the image? [STILL UNANSWERED]

Please help! This script isn't changing the decal of my image ;/

Thanks!

Btw, there is no error message

screen = script.Parent.Decal

while true do
	wait()
	if game.Workspace.A.Zig.Value == false then
	screen.Texture = "http://www.roblox.com/asset/?id=162925348"
	else	
	if game.Workspace.A.Zig.Value == true then
	screen.Texture = "http://www.roblox.com/asset/?id=162925339"
		end 
	end
end	

3 answers

**I think i know how to fix this! Just remove line 8, like so: **

screen = script.Parent.Decal

while true do
    wait()
    if game.Workspace.A.Zig.Value == false then
    screen.Texture = "http://www.roblox.com/asset/?id=162925348"
    else    
    if game.Workspace.A.Zig.Value == true then
    screen.Texture = "http://www.roblox.com/asset/?id=162925339"
        end 
    end
end 

on line 7 change else into elseif (one word) and remove the if on line 8.

if game.Workspace.A.Zig.Vlue == false then
screen.Texture = ""
elseif game.Workspace.A.Zig.Value == true then
script.Texture = ""
end

elseif makes options more flexible, than just doing:

if this then that end if not this then not_that end

its better to do:

if this then that elseif not_this then not_that end

2 comments

0

That diddn't do anything :(

0

because the texture "" doesnt exist. replace both "" with "http://www.roblox.com/asset/?id=162925339"

It is probably an error with the values, I tried the images with my own bricks and they worked.

1 comment

0

Oh, okay thanks

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