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

Decal script not working when script.parent is stated?

Asked by 7 years ago

This script only works when I put -

1local d = game.workspace.poster.decal

but the problem is, I want to put this poster inside of a model, and duplicate that model multiple times. It won't work. Just so you know, the part that is affecting it is

1local d = script.Parent.Parent.Parent.Parent.Decal

1Frame = script.Parent
2Frame.GenerateButton.MouseButton1Click:connect(function()
3local d = script.Parent.Parent.Parent.Parent.Decal
4d.Texture = "http://www.roblox.com/asset/?id="..tonumber(script.Parent.TextureId.Text)-1
5end)

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Roblox recently had an update when you don't have to substract the ID of a decal. Try this:

1Frame = script.Parent
2Frame.GenerateButton.MouseButton1Click:connect(function()
3local d = script.Parent.Parent.Parent.Parent.Decal
4d.Texture = "http://www.roblox.com/asset/?id="..script.Parent.Text
5end)
0
didnt work LiLFriks 39 — 7y
0
Updated eloiishot 47 — 7y
0
still doesnt work LiLFriks 39 — 7y
0
I never heard of any update that said they fixed it. Also sometimes you have to subtract the number by 2 or 3 for the decal to work instead of 1. User#20279 0 — 7y
Ad

Answer this question