So i’ve made a script that uses remote events and stuff, and it works perfectly fine bu there’s a thing that doesn’t really work.
Server
local players = game.Players
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local PlayerAddedEvent = ReplicatedStorage:WaitForChild('PlayerAdded')
players.PlayerAdded:Connect(function(player)
PlayerAddedEvent:FireAllClients(player.Name)
end)
Client
local gui = script.Parent
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local PlayerAddedEvent = ReplicatedStorage:WaitForChild('PlayerAdded')
local ScrollingFrame = gui.ScrollingFrame
local label = ScrollingFrame.TextLabel
PlayerAddedEvent.OnClientEvent:Connect(function(player)
for i, v in pairs(ScrollingFrame:GetChildren()) do
if v:isA('TextLabel') then
v:Clone()
end
end
end)
For some reason it doesn’t clone the TextLabel.
If someone is willing to help me i’d be very grateful!
PlayerAddedEvent.OnClientEvent:Connect(function(player)
for i, v in pairs(ScrollingFrame:GetChildren()) do
if v:isA('TextLabel') then
v:Clone()
v.Parent = ScrollingFrame -- This.
end
end
end)
PlayerAddedEvent.OnClientEvent:Connect(function(player)
for i, v in pairs(ScrollingFrame:GetChildren()) do
if v:isA('TextLabel') then
print(v)
end
end
end)
If it didn’t print anything, then it doesn’t exist.