So, i want to make a gui that shows up on the right corner of my screen, but with an script. i made it work with a screengui, now i need a script to make it work, here is what i got.
a=Instance.new("ScreenGui", StarterGui) b=Instance.new("ImageLabel", ScreenGui) b.Image = 'http://www.roblox.com/asset/?id=160594350' Label.Size = UDim2.new(0,570,0,320) Label.Position = UDim2.new(0,256,0,256)
any mistakes?
Here's my share to the script :) Put this in the backpack of the player and I can assure this will work.
local plr = script.Parent.Parent a=Instance.new("ScreenGui", plr:WaitForDataReady("PlayerGui")) -- Don't want the script to be running ahead of the PlayerGui :) b=Instance.new("ImageLabel", a) b.Image = 'http://www.roblox.com/asset/?id=160594350' b.Size = UDim2.new(0,570,0,320) b.Position = UDim2.new(0,256,0,256)
if this helped +1, if this answered your question check mark.
Also I'm not so sure of the positioning of the ImageLabel or ImageButton would be on the right side Next time. Instead of using "Label" actually use the variable you assigned the ImageLabel or ImageButton to.
Happy Scripting ~ HexC3D
You don't put it in the StarterGui, you put it in the PlayerGui. Here's what i suggest doing.(Put the script in the StarterGui)
local player = script.Parent a = Instance.new("ScreenGui",player.PlayerGui b = Instance.new("ImageLabel",a) b.Image = 'http://www.roblox.com/asset/?id=160594350' b.Size = UDim2.new(0,570,0,320) -- I didn't know what Label was so i assumed it was the imagelabel b.Position = UDim2.new(0,256,0,256)
You could just put the ScreenGui in the startergui instead of using this script. The StarterGui contents automatically goes into the PlayerGui