AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 15 Aug 2014 08:56 PM |
So I'm having a bit of trouble here. When you touch it, you get the gui. The only problem is Touch Ended isn't working. (I also need to learn how to compile many scripts into one script, and this is one of those times) Another thing is that I need to make it only give you 1 gui at max. At the moment it gives you a lot. I think I can fix that though. Here's the code.
local gui = game.ReplicatedStorage.AmmunationGui
-- Touches function onTouch(part) local user = Game.Players:findFirstChild(part.Parent.Name) gui:clone().Parent = user.PlayerGui end script.Parent.Touched:connect(onTouch)
-- Walks away
function WalkAway(TouchEnded) local user = Game.Players:findFirstChild(part.Parent.Name) user.PlayerGui.AmmunationGui:remove() end
script.Parent.TouchEnded:connect(WalkAway) |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 15 Aug 2014 09:01 PM |
Oh god another gta 5 game Oh well, I can't judge |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 15 Aug 2014 09:02 PM |
@Tripane
Well, if I'm in scripting helpers, that means it's better than 100% of the other GTA games out there.
Am I wrong? |
|
|
| Report Abuse |
|
|
Excession
|
  |
| Joined: 09 Sep 2011 |
| Total Posts: 2674 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 15 Aug 2014 09:06 PM |
Fair point
Instead of all this touch stuff, try magnitude instead. I find it easier
I can't give you a true example, I'm not at a computer currently
|
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 15 Aug 2014 09:06 PM |
| I don't know much about magnitude. I'll look at a wiki in the morning. |
|
|
| Report Abuse |
|
|