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

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

Asked by 10 years ago

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

Log in to vote
1
Answered by
Dr_Doge 100
10 years ago

**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 
Ad
Log in to vote
0
Answered by 10 years ago

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

0
That diddn't do anything :( WelpNathan 307 — 10y
0
because the texture "" doesnt exist. replace both "" with "http://www.roblox.com/asset/?id=162925339" TigerCaptain 75 — 10y
Log in to vote
0
Answered by 10 years ago

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

0
Oh, okay thanks WelpNathan 307 — 10y

Answer this question