Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I load in a texture of a decal using scripts?

I mean, I've tried v.Decal.Texture = "rbxassetid://" .. Value but it doesn't seem to change the decal, but just change the value in the decal's Texture

1 answer

Well, v.Decal.Texture = "rbxassetid://"..TextureID.Value should work fine.

Here's an example:

local TextureID = game:GetService("ReplicatedStorage"):WaitForChild("TextureID")
local Image = script.Parent

wait(0.1)

Image.Texture = "rbxassetid://"..TextureID.Value -- Changes texture of Decal

2 comments

0

What format should the TextureID be?

0

Oh wait, nevermind, I've figured it out myself. The ID in the url is different to the id that is in the game when you add it into decals.

This discussion is preserved as it was. New answers, comments, and votes are closed.