Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

TextureId Not A Part Of Local Script?

This Code gives me this error: 12:55:04.012 - TextureId is not a valid member of LocalScript so im not sure whats wrong so i hope someone will help! Thanks for Reading & Helping me out! it really means alot.

function Clicked() 
local plr = game:GetService("Players").LocalPlayer.PlayerGui
plr.LocalScript.TextureId = "rbxasset://textures/SwordTexture.png"
end
script.Parent.MouseButton1Down:connect(Clicked)

1 comment

1

The error is correct. What are you attempting to do/achieve with this script? A LocalScript does not have a TextureId property, so I am a bit puzzled. Are you trying to edit a weapon? Provide the hierarchy please.

1 answer

LocalScript does not have a TextureId Property. Maybe you can put what you are trying to locate, into a variable.

Like this:

LocalScript = (Insert Instance Location)

2 comments

0

Assuming this is related to his previous questions, TextureId is a StringValue that should be inside the LocalScript.

0

He should be naming his values differently as value objects with the same name as properties can conflict.

This discussion is preserved as it was. New answers, comments, and votes are closed.