Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 01:27 AM |
So I have a GUI that pops up when you run into a certain brick. It's called "ShopGUI". I want it so every time the ShopGUI pops up you freeze until you click exit on the ShopGUI. Here is the script so far:
local debounce = false
function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end
function onTouch(part)
local human = part.Parent:findFirstChild("Humanoid")
if (human ~= nil) and debounce == false then
debounce = true
local player = getPlayer(human)
if (player == nil) then return end
user = game.Players:findFirstChild(human.Parent.Name)
script.Parent.ShopGUI:clone().Parent = player.PlayerGui
wait(2)
else
wait(2)
debounce = false
end
end
script.Parent.Touched:connect(onTouch)
|
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 01:30 AM |
I haven't bothered to read your script as the spaces between each line are way too big for me to comprehend but:
"freeze"
Just change the humanoids walkspeed and jumpPower to 0.
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 01:33 AM |
| That's the part I don't know how to do :( |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 01:34 AM |
| player.charachter.torso.Anchchored = true |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 01:35 AM |
| Where do I place that at? (I'm new to scripting :(...) |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
|
| 31 Jan 2016 01:39 AM |
God you fit this thread so well:
http://forum.roblox.com/Forum/ShowPost.aspx?PostID=182667812
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 01:41 AM |
you put
humanoid.Parent.torso.Anchored=true
in the ontouch function |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 01:43 AM |
| I put that in the parenthesis? "function onTouch(part) " |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 01:45 AM |
I'm done.
*smashes laptop in half*
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 01:54 AM |
| I'm new to scripting. I came to this forum for help. Can somebody please tell me how to do this? |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
|
| 31 Jan 2016 02:11 AM |
Put the example code inside the function,
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 02:12 AM |
| you have to spell it right cause speling is hard |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 02:32 AM |
| This acts like a give script rather than a shop pop-up. Do you intend it to be this way or do you want the GUI to appear? (by the way, in your code, i noticed the getPlayer function. Did you know that you can use game.Players:GetPlayerFromCharacter (charaterObject) to get the player from the character model?) |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 12:08 PM |
| I intend it to be this way. I just want it so if the ShopGUI pops up you freeze until you click the exit button. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
|
| 31 Jan 2016 02:29 PM |
| Okay then, so what you want to do is create the GUI and put it into the StartGui. From there you can add a script that will make the GUI visible and intractable. For example, you could add an RemoteEvent that would trigger the GUI to become visible and for the player to stand still. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 04:41 PM |
| I DON'T KNOW HOW TO DO THAT. PLEASE SOME1 HELP ME.. |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 07:49 PM |
| I am writing an auto-script for you now; i shall be done in about 10-15 minutes. It will teach and demonstrate these events in the gameworld. I'll send a reply to this forum with the Roblox model link to it when it is done. Anything else you want to know about while I work on the tutorial? |
|
|
| Report Abuse |
|
|
|
| 31 Jan 2016 07:54 PM |
| help me please http://forum.roblox.com/Forum/ShowPost.aspx?PostID=182795711#182800750 |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
|
| 31 Jan 2016 08:47 PM |
| Okay, here's the link to the free model (http://www.roblox.com/Basic-BindableEvent-Tutorial-item?id=357621866#). Follow the description and listen to the text the script tells you. You also should look into the script to find the green script notes for more clarification and examples. |
|
|
| Report Abuse |
|
|
xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
|
| 31 Jan 2016 08:50 PM |
| I was sure i seen this script ina freemodel somewhere |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 31 Jan 2016 08:51 PM |
| if you are not going to help don't reply. This is not a free model.. |
|
|
| Report Abuse |
|
|