Help me please, this script's supposed to change a sword's mesh TextureID, when you type a ID from the catalog, into the TextBox. But the thing is, when I type it in, it wont work, I tried both local, and non local scripts, and yet it still wont work, I put it into the mesh, so that's it's parent, yet I made the path, and it wont get to it correctly. Could somebody help me out? Here's the script that wont work.
local player = Game.Players.LocalPlayer
local swordMesh = script.Parent
local GuiBar = player.PlayerGui.StarterGui.Frame.TextBox -- If this isn't the right way to find the path, someone fix it please.
GuiBar.FocusLost:connect(function() --When someone is finished typing into the TextBox,
pcall(function()
swordMesh.TextureId = "http://www.roblox.com/asset/?id="..tostring(tonumber(GuiBar.Text)-1)\
end)
end)

1 comment
There's no output problem, I really do need help.