Hi, my script is highlighting line 5. I know why but I don't know how to fix it. I just had a holiday for a week so it has removed all of my knowledge of scripting. Please help me fix this simple error.
I think else has to do something with the 'if' statement. I just can't remember though -_-
Best regards, Nathan.
Fanfive=game.Workspace.Fans.Five.Decal function onClick() Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126631' else Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126649' end script.Parent.ClickDetector.MouseClick:connect(onClick)
Where you have the else I think it should be 'else if'
You were probably right about the 'if' statement
Hope this helps.
^Ignore above^
I think it should be like this
Fanfive=game.Workspace.Fans.Five.Decal function onClick() Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126631' else) Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126649' end script.Parent.ClickDetector.MouseClick:connect(onClick)
whys there a else when there is no if?