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

How do I make a decal insert gui?

I am at a loss with this script. The goal of this script, is when the enter button is hit then the text inside of the idimput box will become the texture of the decal

button = script.Parent
screen1 = game.Workspace.screen1.Decal.Texture
screen2 = game.Workspace.screen2.Decal.Texture

function onclicked()
    screen1 = "http://www.roblox.com/asset/?id="..(tostring(button.idInput.Text - 1))
    screen2 = "http://www.roblox.com/asset/?id="..(tostring(button.idInput.Text - 1))
end

button.Enter.MouseButton1Down:connect(onclicked)


1 answer

✓ Accepted answer

This will make it where you insert the id, YOU HAVE TO PRESS ENTER!, NO BUTTONS SHOULD BE USED

Remember, this should be in a LocalScript


-- NO BUTTONS!
player=game.Players.LocalPlayer
mouse=player:GetMouse()
screen1 = game.Workspace.screen1.Decal.Texture
screen2 = game.Workspace.screen2.Decal.Texture

function onKeyDown(key)
if string.byte(key)==13 then
    screen1 = "http://www.roblox.com/asset/?id="..(tostring(button.idInput.Text - 1))
    screen2 = "http://www.roblox.com/asset/?id="..(tostring(button.idInput.Text - 1))
end
end


mouse.KeyDown:connect(onKeyDown)


More info on LocalScripts - http://wiki.roblox.com/index.php?title=LocalScript More info on PlayerMouses - http://wiki.roblox.com/index.php?title=PlayerMouse More info on the KeyDown event - http://wiki.roblox.com/index.php?title=KeyDown_(Event)

More info on everything - http://wiki.roblox.com

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