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.
1 | Fanfive = game.Workspace.Fans.Five.Decal |
2 |
3 | function onClick() |
4 | Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126631' |
5 | else |
6 | Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126649' |
7 | end |
8 |
9 | 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
1 | Fanfive = game.Workspace.Fans.Five.Decal |
2 |
3 | function onClick() |
4 | Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126631' |
5 | else ) |
6 | Fanfive.Texture = 'http://www.roblox.com/asset/?id=166126649' |
7 | end |
8 |
9 | script.Parent.ClickDetector.MouseClick:connect(onClick) |
whys there a else when there is no if?