Sword Help?
local Texture = GuiBar.Text local SwordMesh = script.Parent pcall(function() SwordMesh.TextureId = "http://www.roblox.com/asset/?id=" .. Texture end)
For this script, I want it upgraded, so I want it to change Not everyone's sword just the user who types in a decal ID, into a GUI chatbar. And once they press enter, the script inserts the mesh's TextureID, to the one they typed in. Could someone help me with that?
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)
Add aKeyDown
event for enter and get the .Text
of the textbox you want to use to get the decal id. This is really simple...
By the way, "Data Persistence" doesn't go with this.
Lem0n, your problem is that you didn't even connect the function. Put in a connector line and the above script should run smoothly.