3DGamers
|
  |
| Joined: 29 Dec 2008 |
| Total Posts: 327 |
|
|
| 23 Aug 2013 11:02 PM |
Players.Player1.PlayerGui.Animate:22: attempt to index global 'exgui' (a nil value)
MoveExaime = function(Mouse) if Mouse.Target.Parent:FindFirstChild("Examine") ~= nil and (Mouse.Target.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude < 15 then local exgui = script.Guii exgui.Adornee = Mouse.Target exgui.Parent = Player.PlayerGui exgui.Frame.ObjName.Text = Mouse.Target.Parent:FindFirstChild("Examine").Value else exgui.Adornee = nil --- ERROR HAPPENS WITH THIS end end
I don't see what's wrong.. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 11:07 PM |
| Because 'exgui' is not defined in the else statement. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 11:07 PM |
| Try just Adornee'ing it to its parent...? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 11:09 PM |
You spelled
Gui is spelled wrong on the line where you make your variable. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 11:11 PM |
| Perhaps the name of the thing he's tagging a variable to is actually called Guii? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 11:11 PM |
Here's what you're trying to do:
if (condition) then local a = 5 else print(a) end |
|
|
| Report Abuse |
|
|
3DGamers
|
  |
| Joined: 29 Dec 2008 |
| Total Posts: 327 |
|
|
| 23 Aug 2013 11:13 PM |
| So I should redefine exgui again in the else statement? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 11:14 PM |
| Yes, or before the if statement. |
|
|
| Report Abuse |
|
|