Decal doesn't apply?

My decal doesn’t apply to the stick somewhy

local frame = script.Parent:WaitForChild("Frame")
local decalIdTextbox = frame:WaitForChild("decalid")
local updateButton = frame:FindFirstChild("UpdateButton")

local function updateDecalImage()
	local player = game.Players.LocalPlayer
	local character = player.Character
	local backpack = player:FindFirstChild("Backpack")

	local tool = backpack and backpack:FindFirstChild("stick") or (character and character:FindFirstChild("stick"))
	if not tool then
		warn("[UpdateDecal] Tool 'stick' not found in Backpack or Character")
		return
	end
	print("[UpdateDecal] Found tool:", tool.Name)

	local hockeyBottom = tool:FindFirstChild("HockeyBottom")
	if not hockeyBottom then
		warn("[UpdateDecal] HockeyBottom part not found in stick tool")
		return
	end
	print("[UpdateDecal] Found HockeyBottom")

	local decalId = decalIdTextbox.Text
	local numericId = decalId:match("%d+")
	if not numericId then
		warn("[UpdateDecal] Invalid decal ID entered:", decalId)
		return
	end
	print("[UpdateDecal] Parsed decal ID:", numericId)

	local oldDecal = hockeyBottom:FindFirstChild("HockeyDecal")
	if oldDecal then
		oldDecal:Destroy()
	end

	local newDecal = Instance.new("Decal")
	newDecal.Name = "HockeyDecal"
	newDecal.Texture = "rbxassetid://" .. numericId
	newDecal.Face = Enum.NormalId.Front
	newDecal.Parent = hockeyBottom
	print("[UpdateDecal] Applied new decal with ID:", numericId)

	hockeyBottom.Transparency = 0
end

decalIdTextbox.FocusLost:Connect(function(enterPressed)
	if enterPressed then
		updateDecalImage()
	end
end)

if updateButton then
	updateButton.MouseButton1Click:Connect(updateDecalImage)
else
	warn("[UpdateDecal] UpdateButton not found inside Frame")
end

ah, a classic

this isseu is really weird and to this day i still haven’t found a fix to it besides just storing the decal and cloning it when i need it

if you don’t want to store decals and clone them, you can use this line of code instead of rbxassetid://

string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", Id)

Id being… your decal, but this method has severe limitations
the width and height cannot be smaller than 150, and cannot be bigger than 420 (w=420&h=420)

i’d really just have to recommend storing the decals and cloning them whenever you need
i don’t know why this issue happens and i never found a fix for it

Thanks it worked! Hopefully it will get fixed soon.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.