Decals not showing up after their id is changed

So, I have this projector thing right, I want to have an input for image ids so any decal can appear on it.

Basically it just gets an input from the client, sends it to the server, and is supposed to change the decal id and then make the decal transparency 0.

The id can get to the script inside of the decal and it not only prints the id but changes the Texture property’s value, however the changes of the decal do not show up on the server or the client.

local Decal = script.Parent

Decal.thing.Event:Connect(function(id)
	print(id)
	local thing = ("http://www.roblox.com/asset/?id=" .. id)
    Decal.Texture = thing
end)

This is the script used to change it, it works fine but the changes, again, don’t show up on the server and client, I’ve tried making the decal be cloned, flicker transparency on and off, various asset URLs, the lot.

Any help would be greatly appreciated.

Edit: keep it in mind variations of this script haven’t heeded any better result

Is it calling an event if so try replacing “Event:Connect()” with OnServerEvent:Connect() or OnClientEvent:Connect().
Also if the event is being fired from a client to the server make sure you have a tuple for the player like “OnServerEvent:Connect(function(plr,id))”

local Decal = script.Parent

Decal.thing.Event.OnServerEvent:Connect(function(plr,id)
	print(id)
	local thing = ("http://www.roblox.com/asset/?id=" .. id)
    Decal.Texture = thing
end)

it’s using a server-sided BindableEvent, though that isn’t the issue since it’s being called from the server. the issue is the decal actually being visible whenever the id is changed.

I see no issue with your code then can show me the output?

It isn’t the code that’s the problem, it’s the decal being visible when it’s id is changed, and, yes, the transparency when it is changed is set to 0

Have you tried launching the game from roblox itself because at sometimes content doesn’t load on studios side

Yes, of course I did. Still nothin.

image
Oh I made a error

the BindableEvent is called thing. Event is the OnServerEvent / OnClientEvent equivalent for BindableEvents

Thats odd I see no problem with it on my side

local Decal = script.Parent

Decal.Event.Event:Connect(function(...)
	print(...)
	local thing = ("http://www.roblox.com/asset/?id=" .. ...)
	Decal.Texture = thing
	script.Parent.Decal.Transparency = 0
end)

--- Firing 
local Images = {
	[1] =  6319951708,
	[2] = 4637746372,
	[3] = 4637746372
}

while wait(.25) do
	for i = 1,#Images do
		local randomimage = math.random(#Images)
		script.Parent.Decal.Transparency = 1
		 script.Parent.Decal.Event:Fire(Images[randomimage])
	end
end

The issue was ultimately resolved, I appreciate the help though

Also incase anyone happens to be viewing this in the future in hopes for some help on this kind of issue, the way we solved this issue was by using the InsertService coupled with LoadAsset() and FindFirstChildWhichIsA() if that helps at all

4 Likes