Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 12 Sep 2016 03:46 AM |
Hello, I need help with a Self Check-in at my airport. I don't know how to script it to that if you have the right ticket (T-shirt) you can press on maybe Buisness Class and if you have that t-shirt you'll get Buisness Class ticket the same with First Class and Economy, but if you don't it will say Error?
Thanks |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 04:07 AM |
| Ew... VIP T-shirts again? I thought that we got rid of those. Use game passes. |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 05:27 AM |
| tickets? woudn't microtransactions work better for that? |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 12 Sep 2016 06:10 AM |
| Idk what's best, I just mean like if you have a gamepass or t-shirts idk, you will be able to press on the Screen gui, (example: "Buisness Class") then if you have that gamepass/ticket/rank in group for that matter, you will get the ticket to get through security and stuff. But if not, it will say error, and you have to choose the class you have, or you need to wait for the "normal" check-in |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 06:13 AM |
Are you looking for a one-time payment or every time?
~MightyDantheman |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
| |
|
|
| 12 Sep 2016 06:23 AM |
Then just check if the player owns the item or not.
This wiki page might help:
http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PlayerOwnsAsset
~MightyDantheman |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 12 Sep 2016 06:25 AM |
| Thanks, but what I need is the Screen Gui for it, I have build the machine, now I just want it when I click on it, it will bring a screen gui which gives you options and so on.. |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 06:41 AM |
Just use the onClick() function.
Some more links:
http://wiki.roblox.com/index.php?title=Making_an_onClicked_script http://wiki.roblox.com/index.php?title=API:Class/ClickDetector
You'll have to make the GUI yourself, as well.
~MightyDantheman |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 12 Sep 2016 06:52 AM |
| Okay, i'm actually doing that right now because I kinda figured out, thanks! |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 12 Sep 2016 07:33 AM |
| well rip I give up I can't figure it out with the clone and stuff :( |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 07:35 AM |
http://wiki.roblox.com/index.php?title=API:Class/Instance/Clone
~MightyDantheman~ |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 12 Sep 2016 08:14 AM |
I cant figure out the script, you are proberbly gonna cringe when u see this:
local Button = script.Parent local Player = game.Players local Clone = game.ServerStorage["Economy Plus"] Clone.Parent = game.Workspace Clone.Position = game.Workspace.Player1Torso.Position
local function onMouseClick(playerWhoClicked) game.Players.PlayerAdded:connect(function(plr) if game:GetService("MarketplaceService"):PlayerOwnsAsset(497401068) then if Player:PlayerOwnsAsset(497401068) then wait(1) local Economy = game.ReplicatedStorage:WaitForChild("Economy Plus") function onButtonClicked() local Thing = Economy:Clone() Thing.Parent = game.Players.LocalPlayer.Backpack end end end end) end script.Parent.MouseButton1Click:connect(onButtonClicked) |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 08:49 AM |
First, the function name doesn't corespond to the function name connected to the event. Secondly, why is there a player added event in the function? The player added won't do anything since the player who clicked already exists. Thirdly, game:GetService("MarketplaceService"):PlayerOwnsAsset(playerWhoClicked, 497401068), after that you no longer need a second if statement.
|
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 08:54 AM |
| --[[Clone.Position = game.Workspace.Player1Torso.Position ?]] |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2016 08:55 AM |
| I'm to tired to rewrite that and to analyze all of it... |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 12 Sep 2016 12:55 PM |
| Just saying im very bad at scripting xd |
|
|
| Report Abuse |
|
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
| |
|
Chrosser
|
  |
| Joined: 10 May 2014 |
| Total Posts: 38 |
|
|
| 01 Oct 2016 08:05 AM |
I have changed the script a bit, maybe you can help me a bit better with this one?
local player = game.Players.PlayerName local clone = game.ReplicatedStorage["Buisness Class"]:Clone()
function onMouseButton1Down(player) if game:GetService("MarketplaceService"):PlayerOwnsAsset(497405712) then clone.Parent = player.Backpack end end
script.Parent.MouseButton1Down:connect(onMouseButton1Down) |
|
|
| Report Abuse |
|
|