I’m trying to make a local script where items in a shop which are stored in boxes are cloned into a scrolling frame which has a UIGridLayout. The problem is, is that this ReplicatedFirst script doesn’t work at all and the local script in my gui never receives the signal. I’ve tried this in the local script I have in my gui and it works but I want to know why it doesn’t work when I fire it to the gui script.
ReplicatedFirst local script:
if game:IsLoaded() == false then game.Loaded:Wait() end
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Bindables = ReplicatedStorage.Bindables
local Compartments = ReplicatedStorage.Compartments
for i = 1,#Compartments:GetChildren() do
Bindables.RenderShop:Fire(Compartments:FindFirstChild(tostring(i)))
end
gui script:
Bindables.RenderShop.Event:Connect(function(compartment)
local comp = compartment:Clone()
comp.Parent = scrollingframe
end)