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

Why doesn't my texture-changing script work ?

Asked by 7 years ago
Edited 7 years ago

Hello,there !

I'm trying to make a script where you click onto a button on a ScreenGui and then your mesh's texture changes by the selected color, but it doesn't work...

Here's my attempt:

Car = script.Parent Red = game.StarterGui.ChevPaint.ImageLabel.ScrollingFrame.Red.TextButton

Red.MouseButton1Click:connect(function() Car.TextureID = '1005158804'

end)

I'm not sure if I did it correct,I didn't get any red or blue lines underneath the codes. Could any of you find the problem because I'm not sure of it... Do I write full address of the ID like 'http://www.roblox.com/develop/decals/[Code Here]/Red' or just '[Code Here]'

0
please format your code PyccknnXakep 1225 — 7y
0
like 'rbxassetid://1005158804' already tried... LordTechet 53 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

To change the texture id you need to add rbxassetid://. For example:

script.Parent.Decal.Texture = "rbxassetid://1234567890"
script.Parent.ImageLabel.Image = "rbxassetid://1234567890"

Please accept my answer if this helped!

0
Sorry,already tried with the rbxassetid:// way, but no changes, but I assume it must be correct as you didn't write any corrections rather than rbx thing LordTechet 53 — 7y
Ad

Answer this question