GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 18 Dec 2016 10:49 PM |
why does the text stay the same after moving the mouse on target then moving it in the sky
mouse.Move:connect(function() if mouse.Target then
local dist = (player.Character.Torso.Position-mouse.Hit.p).magnitude if dist <= range then for _, v in pairs(Showable) do
if v =='Goblin' then Fightable = true else Fightable = false end
if v =='Tree' then Chopable = true else Chopable = false end
if mouse.Target.Parent:IsA'Model'and mouse.Target.Parent.Name == v then if Fightable then textLabel.Text =' Attack: '..mouse.Target.Parent.Level.Value attack() elseif Useable then textLabel.Text =' Use: '..mouse.Target.Parent.Name elseif Chopable then textLabel.Text =' Chop down: '..mouse.Target.Parent.Name
end return else if not down then textLabel.Text ='' end end end end end end)
|
|
|
| Report Abuse |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 18 Dec 2016 11:19 PM |
Because you're saying, at the beginning
if mouse.Target then
At the end put
else text = "nothing"
|
|
|
| Report Abuse |
|