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

Script has been updated and it's not working still??

Help please? This script was updated yet, it still wont work!

local player = Game.Players.LocalPlayer

local swordMesh = script.Parent

local GuiBar = player.PlayerGui.Example.TextBox --Change to correct path.

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) --Try to change the texture.

end)

end)

1 answer

I think that your path is incorrect. Make sure that there is actually something inside your player's PlayerGui called Example (It has to be a ScreenGui) and inside that there is something called TextBox (It has to be a TextBox).

2 comments

0

Oh, how would I change the path from this, through a frame?

0

Well that depends on the name of the frame, say it was called "Frame" and it was located in the ScreenGui called "Example" and inside of this frame was the TextBox named "TextBox", then the path would be: local GuiBar = player.PlayerGui.Example.Frame.TextBox

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