I have tried doing so for several hours, yet it does not work
01 | script.RemoteEvent.OnServerEvent:Connect( function (player) |
02 |
03 | local np = Instance.new( "ImageLabel" ) |
04 |
05 | np.AnchorPoint = Vector 2. new( 0.5 , 0.5 ) |
06 | np.Position = UDim 2. new( 0.5 , 0 , 0.5 , 0 ) |
07 | np.Size = UDim 2. new( 1 , 0 , 1 , 0 ) |
08 | np.BackgroundTransparency = 1 |
09 | np.Parent = game.Workspace:FindFirstChild( "1" ..player.Name).BillboardGui |
10 | game.Workspace:FindFirstChild( "1" ..player.Name).BodyPosition.Position = Vector 3. new(- 451.013 , 28.025 , 3099.5 ) |
11 | wait( 0.3 ) |
12 | game.Workspace:FindFirstChild( "1" ..player.Name).BillboardGui.ImageLabel.Image = |
13 | "http://www.roblox.com/asset/?id=" ..script.Parent.Parent.TextBox.Text |
14 |
15 |
16 | end ) |
Everything works just fine until the image from the TextBox is assigned, it just does not appear, perhaps the reason is the Text property of a TextBox does not Change when something Is written on it.
01 | script.RemoteEvent.OnServerEvent:Connect( function (player) |
02 |
03 | local np = Instance.new( "ImageLabel" ) |
04 |
05 | np.AnchorPoint = Vector 2. new( 0.5 , 0.5 ) |
06 | np.Position = UDim 2. new( 0.5 , 0 , 0.5 , 0 ) |
07 | np.Size = UDim 2. new( 1 , 0 , 1 , 0 ) |
08 | np.BackgroundTransparency = 1 |
09 | np.Parent = game.Workspace:FindFirstChild( "1" ..player.Name).BillboardGui |
10 | game.Workspace:FindFirstChild( "1" ..player.Name).BodyPosition.Position = Vector 3. new(- 451.013 , 28.025 , 3099.5 ) |
11 | wait( 0.3 ) |
12 | game.Workspace:FindFirstChild( "1" ..player.Name).BillboardGui.ImageLabel.Image = "rbxassetid://" ..script.Parent.Parent.TextBox.Text |
13 |
14 |
15 | end ) |
The problem here is probably using "http://www.roblox.com/asset/?id=" instead of "rbxassetid://". Hope this helps :)