|
| 09 Aug 2016 10:00 PM |
I'm trying to make a script that changes a picture if the picture is a certain picture but no luck. Help?
while true do if game.Workspace.Camera.BattleField.Player.PlayerPokemon.Gui.Pic.Image = "Bob"
then game.Workspace.Camera.BattleField.Player.PlayerPokemon.Gui.Pic.Image = "Bob D" if not then end |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:01 PM |
Bump
I'm new to scripting and I need help on this |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 09 Aug 2016 10:02 PM |
Read the wiki... You're not even close, and this is basics.
R$10,709 |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:03 PM |
@lu,
I just need help on this one script! |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Aug 2016 10:06 PM |
| The Image has to be a valid link (like rbxasset://decalID or whatever) and you should remove that random "if not then" and replace that with an "end" to close the if statement, then you should add a wait() so you don't crash :) |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:10 PM |
@Flux,
I did what you said and there is still a red line under the first = |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 09 Aug 2016 10:18 PM |
If you're comparing its ==. As I said, read the wiki, its basics. If you can't script this, you won't be able to script anything else either. You need to learn on your own before coming for help, because you obviously haven't tried.
R$10,709 |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 09 Aug 2016 10:18 PM |
scripts like this*
R$10,709 |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:20 PM |
| OP '==' is the comparison operator, but even then the method you are using is not really that great. I'm assuming you're trying to cycle between the 2 images (or more than 2 images), you should probably use a table than a variable that holds the index and the table holds all the image asset IDs, so you can cycle by incrementing that index variable (and wrap it around when it reaches the end) |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:22 PM |
| just paste the wiki for him |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 09 Aug 2016 10:23 PM |
@Flux, if he doesn't know how operators work, do you think he knows what you just explained?
R$10,709 |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:23 PM |
@flux,
I am trying to make a script that changes the image if a specific image url appears in the imagelabel |
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:34 PM |
Bump
If anyone could post a corrected script or even a wiki link that would be great |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 09 Aug 2016 10:37 PM |
http://wiki.roblox.com/index.php?title=Operator
http://wiki.roblox.com/index.php?title=Loops
http://wiki.roblox.com/index.php?title=Content
http://wiki.roblox.com/index.php?title=Conditional_statement
R$10,709 |
|
|
| Report Abuse |
|
|
Laedere
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 23601 |
|
|
| 09 Aug 2016 10:38 PM |
flux told you what was wrong lol
|
|
|
| Report Abuse |
|
|
|
| 09 Aug 2016 10:55 PM |
| I would be really happy if someone re-wrote it |
|
|
| Report Abuse |
|
|