I have a GUI which is created in a scrolling frame when a humanoid is cloned into workspace. I don't know how to make it so if more humanoids spawn in, new GUI messages will be created slightly under the one above it.
Here is an example of the concept with the script I have currently. The script only creates the GUI in that specific position I told it to.
https://gyazo.com/811d10f2f96196b7851e3655b13bfd68
Here is the code I used to create the GUI in the example. Don't know if I'll have to create a new script or can use this one.
local myRemoteEvent = game.ReplicatedStorage.RemoteEvent
game.Players.PlayerAdded:connect(function(nP)
nP.CharacterAdded:connect(function(nC)
myRemoteEvent.OnClientEvent:Connect(function() --When the humanoid is cloned
TestFrame = Instance.new("Frame", nP.PlayerGui.DispatchGUI.Calls)
TestImage = Instance.new("ImageLabel", TestFrame)
TestText = Instance.new("TextLabel", TestFrame)
--Frame
TestFrame.Size = UDim2.new(0,50,0,50)
TestFrame.BackgroundTransparency = 1
--Image
TestImage.Position = UDim2.new(0,0,0,50)
TestImage.Size = UDim2.new(0,300,0,40)
TestImage.Image = "rbxassetid://156579757"
TestImage.ImageTransparency = 0.8
TestImage.BackgroundColor3 = Color3.new(255/255,191/255,029/255)
TestImage.ZIndex = 2
--Text
TestText.Position = UDim2.new(0,0,0,50)
TestText.Size = UDim2.new(0,300,0,40)
TestText.ZIndex = 3
TestText.Font = "SourceSansBold"
TestText.Text = "10-31R - BURGLARY"
TestText.TextSize = 30
TestText.BackgroundTransparency = 1
TestText.TextColor3 = Color3.new(52/255,52/255,52/255)
TestText.TextStrokeTransparency = 1
TestText.TextXAlignment = "Left"
end)
end)
end)
Any help will be useful. Thanks
