I feel a bit dumb for asking this, as I am pretty advanced in scripting in lua.. It's just as I been playing Minecraft coding in Java I completely just went dead, any help?
--// Weapons
-- Not using the strings used for the ID's
local Glock17 = 30474685
local M14 = 30474688
local M24 = 30474675
local M4A1 = 30474667
local Peacekeeper = 30474695
--// Services needed
-- Not using the string used for the service
local MarketPlaceService = game:GetService("MarketPlaceService")
--// Script, do not edit anything below this line
script.Parent.DialogChoiceSelected:connect(function(Player, Weapon)
if (Weapon == script.Parent.Glock17) then
game:GetService("MarketPlaceService"):PromptPurchase(Player, 30474685)
end
end)

4 comments
Shouldn't line 20 be "if (Weapon == Glock17) then"?
Well, Glock17 is the ID, and I just put that there to keep notes.
Weapon == script.Parent.Glock17 asked the script if Weapon is exactly the same instance as script.Parent.Glock17, not if they are identical, but rather if they are the same thing
I'm confused, honestly...