On line 20 i get the error "HTTP 403" one time, and when i click again, it gives "Bad Request." Basically I am trying to grab the ID that a user types into a textbox, and use that ID as the decal ID in InsertService:LoadAsset. This works when I remove the variable TextInput and instead use a random decal ID.
SERVER SCRIPT (part of it anyway)
ReplicatedStorage = game:GetService("ReplicatedStorage") InsertService = game:GetService("InsertService") function morphPlayer(player,TextInput) print "decal ID:"(TextInput) if player.Character:findFirstChild("Chest") then player.Character.Chest:remove()end if player.Character:findFirstChild("Humanoid") ~= nil then --=== local morph = game.ServerStorage.Morphs:FindFirstChild("Template") if morph == nil then print "No template found" end --=== if morph then local chest = morph.Chest:Clone() chest.Parent = player.Character local asset = InsertService:LoadAsset(TextInput) local decal = asset:FindFirstChildOfClass("Decal") decal.Parent = chest.Middle decal.Face = "Front" local decal2 = decal:Clone() decal2.Parent = chest.Middle decal2.Face = "Back"
LOCALSCRIPT
Button = script.Parent Button.MouseButton1Click:Connect(function() TextInput = Button.Parent.TextBox.Text game.ReplicatedStorage.CustomMorph:FireServer(TextInput) end)