I tried that exact piece of code you provided in my game and it changed the decal without any problems, I think there’s a different problem with your code. Try adding prints along it to see if it’s even reaching that.
Did you use a local or server script.
Server but I’m sure it works with a local to
I used server to, I dont know why this doesn’t work.
I recreated it and it works perfectly fine for me, here’s the model file if you want my version. MoneyTool.rbxm (3.4 KB)
Alright I will test this. Let me try.
Its not working for me, when I change the value in properties and equip it again, its still 1 doller.
I know exactly why. The asset ID of a decal seems to change when I put it in a decal instance, and it works. Put the number part of it inside an image or decal, then copy the formatted code back into you code. Hope it works!
If you’re changing it directly in play mode on the client, you’re only changing the value locally. Click server next to the play button
Well I need it to change instantly.
script.Parent.Equipped:Connect(function()
if script.Parent.MoneyValue.Value == 1 then
script.Parent.Handle.Decal1.Texture = "rbxassetid://7994761"
script.Parent.Handle.Decal.Texture = "rbxassetid://7994777"
elseif script.Parent.MoneyValue.Value == 2 then
script.Parent.Handle.Decal1.Texture = "rbxassetid://12424991"
script.Parent.Handle.Decal.Texture = "rbxassetid://12425000"
end
end)
Try this out first, and make sure ‘MoneyValue’ is an IntValue or a NumberValue I tested it, it’s working fine for me?
I dont know why its not working for me
Well, actually, so it works as, I have this gui you put a number into. If you put 2, it gives you that money tool, and I want it to change the decal like that, if this helps at all?
And basically, the started value is 0, meaning it only gets changed to 2 or 1, if the player types that.
Okay so what I think is wrong is the part where it gives the value to the tool, its client, so im going to make it server.
Ah so, You’re using a textbox to change the value? I think that’s the problem. Maybe try setting the Value to 1 or 2 and test if it works. It should, I think the textbox is the issue here.
For the client to communicate to the server you use remote events
Yes, I made a new post asking how to make it client and server sided.
Try using remote events to get this working.
Hm alright I will try. Character30limit