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

TextureId Not A Part Of Local Script?

Asked by 8 years ago

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
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. Shawnyg 4330 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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)
0
Assuming this is related to his previous questions, TextureId is a StringValue that should be inside the LocalScript. adark 5487 — 8y
0
He should be naming his values differently as value objects with the same name as properties can conflict. Spongocardo 1991 — 8y
Ad

Answer this question