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

How do I make a decal insert gui?

Asked by 10 years ago

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

Log in to vote
0
Answered by
Dominical 215 Moderation Voter
10 years ago

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

Ad

Answer this question