|
| 09 Jul 2016 08:51 PM |
Hello! I have made a GUI that is in a tool. Im wanting the GUI to pop up when the player selects the tool. I have tried:
script.Parent.Equipped:connect(function(player) local gui = script.Parent.ScreenGui:Clone() gui.Parent = player.PlayerGui end)
script.Parent.Unequipped:connect(function(player) player.PlayerGui.ScreenGui:Destroy() end)
Probably all wrong so please help!!!! |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2016 09:02 PM |
| Please help I dont want to bump... |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2016 09:16 PM |
Check the output.
http://wiki.roblox.com/index.php?title=API:Class/Tool/Equipped
http://wiki.roblox.com/index.php?title=API:Class/Tool/Unequipped You're using the wrong parameters. You need to define player as game.Players.LocalPlayer and this should be in a localscript. Remove those parameters.
Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2016 09:43 PM |
| I know this is kinda rude :D but can someone give me an idea on how to write this script as i'm wanting to learn. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2016 09:45 PM |
I just gave you an idea on how to write the script...in fact, I gave you instructions..
Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx |
|
|
| Report Abuse |
|
|