localscript inside the players gui:
local plr = game.Players.LocalPlayer
local char = plr.Character
script.Parent.MouseButton1Click:Connect(function()
script.Parent.ReturnCamera.Disabled = false
script.Parent.Parent.Parent.LobbyGui.Enabled = true
script.Parent.Parent.Enabled = false
wait()
script.Parent.ReturnCamera.Disabled = true
--collect and send data to users serverfolder--
local folder = game.ReplicatedStorage.userDataStorage:FindFirstChild("CartData:"..char.Name)
if folder == nil then
print("folder nil")
end
if folder ~= nil then
print("folder not nil")
local carttype = script.Parent.Parent.Parent.CustomData.CartType.Value
local colortype = script.Parent.Parent.Parent.CustomData.ColorType.Value
folder.ChangeData:FireServer(carttype,colortype)
print("sent data")
end
-----------------------
wait()
script.Disabled = true
end)
script inside replicated storage:
script.Parent.ChangeData.OnServerEvent:Connect(function(plr,carttype,colortype)
print("recieved data at RS")
script.Parent.CartType.Value = carttype
script.Parent.ColorType.Value = colortype
print("data set")
end)
there is a folder inside replicatedstorage that is labeled "CartData" with a players name at the end. Im trying to send data from the folder owner's gui over to that folder but it seems to not read off of it. the localscript successfully fires to the remote event, but the remote event listening script doesn't detect it. help?

2 comments
that didnt work, I was able to print the name of both the remote event and the folder owner's name, but it still refuses to fire the remote event.
did u do it on both scripts, u always need to wait for the remote event in all scripts