I am trying to make a part that allows the player to insert an image id into a textbox after purchasing a dev product which will be put onto a part for the server to see. However, roblox has limitations when it comes to decal ids and image ids. Before you ask me if I’ve tried converting them, I have. The issue is that when the player inserts the image id into the textbox of the GUI, the script is supposed to change the decals texture property. The property for the texture just ends up being set to rbxassetid://
with no id behind it which was the intention, and should be working but I’m still confused why it’s not. Any help is appreciated! Let me know how I can improve my script as well.
Script:
local MarketPlaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local ProductId = 1278400092
local obj
game.ReplicatedStorage.PurchaseImage.OnServerEvent:Connect(function(player, v)
obj = v
end)
local function ProcessReceipt(ReceiptInfo)
local Player = Players:GetPlayerByUserId(ReceiptInfo.PlayerId)
if not Player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if Player then
Player.PlayerGui.Main.PosterUI.Visible = true
Player.PlayerGui.Main.PosterUI.Button.MouseButton1Click:Connect(function()
local id = Player.PlayerGui.Main.PosterUI.TextBox.Text
obj.Decal.Texture = "rbxassetid://"..tostring(id)
Player.PlayerGui.Main.PosterUI.Visible = false
end)
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketPlaceService.ProcessReceipt = ProcessReceipt