|
| 20 Aug 2017 03:23 PM |
I tried making my first ever homemade script (by that i mean just not using free models) and it has a small issue, I don't know what it is but can someone tell me how to fix this script so that when the tool is equipped it will show a GUI. Script: Tool = script. parent Tool. Equipped :connect (on Equipped)
if Tool. equipped = true then Tool. Pokemon. Pokemon. visible = true else Tool. Pokemon. Pokemon. visible = false |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2017 03:29 PM |
end
also you'll need to make it a function and call it everytime a player equips the tool otherwise it will only happen (at most) once |
|
|
| Report Abuse |
|
|
| |
|
hokyboy
|
  |
| Joined: 31 Jan 2014 |
| Total Posts: 115 |
|
| |
|
|
| 20 Aug 2017 03:39 PM |
Tool = script. parent
local function on Equipped() if Tool. equipped == true then Tool. Pokemon. Pokemon. visible = true else Tool. Pokemon. Pokemon. visible = false end end
Tool. Equipped :connect (on Equipped)
I have a basic knowledge of scripts and haven't worked with tool yet so you'll have to make sure .equipped and stuff is actually a thing. unless you already know it is :P
and i'm guessing you know there shouldn't be spaces after the .'s and:'s or between "on" and "Equipped" :)
I'm going to bed now so sorry if it doesn't work :/ |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2017 03:39 PM |
| if you don't have anything helpful to say just don't bother |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2017 03:41 PM |
| yeah i know about the spaces, its because the roblox hashtags stuff but yeah thanks! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 21 Aug 2017 07:14 AM |
| well actually i found a script right here; local GUI = ### script. Parent. Equipped: connect (function() GUI = script. Pokemon: Clone() -- copy the GUI GUI. Parent = game. Players. Local Player. Player GUI -- place the GUI to player's player GUI end) all i need now is how to use the on un-equipped function |
|
|
| Report Abuse |
|
|