I'm making a script where when the player clicks they will become a decal. however I can't let the players choose what decal they want to be because decals are different in roblox then on the site. Here is my code:

local player = game.Players.LocalPlayer
local invis = false
local char = player.Character
script.Parent.MouseButton1Click:Connect(function()

   game.ReplicatedStorage.invis:FireServer(invis)
    invis = true
char.Annoying.Decal.Texture = "http://www.roblox.com/asset?id=".. game.Players.LocalPlayer.PlayerGui.CustomDecal.TextBox.Text

  end)

An example is someone would type 4908955937 and you would get

http://www.roblox.com/asset?id=4908955937

and you would need:

http://www.roblox.com/asset/?id=4908955930

What can i do?

1 comment

0

Yeah, Roblox is weird like that. I would say subtract from the ID until it gets a valid image. I'm pretty sure you can use MarketplaceService to verify that the image they input is valid.