Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
oggy521 72
5 years ago

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

Log in to vote
0
Answered by 5 years ago

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
0
What format should the TextureID be? oggy521 72 — 5y
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. oggy521 72 — 5y
Ad

Answer this question