I have two places, one is a sub-place of the other (I don’t know the actual term). I want to send data between them, but I don’t know how.
I have tried MessagingService, I might be doing it wrong so heres my current code
Place1 (Main place that recieves data)
function PlayerAdded(player)
local MsgName = player.UserId.."_TixEarned"
MsgService:SubscribeAsync(MsgName,function(Data)
print(Data)
end)
end
Place2 (Sub-place that sends data to place 1)
Players.PlayerRemoving:Connect(function(plr)
local v = plr:WaitForChild("CurTixEarned")
if v then
local amount = v.Value
local usid = plr.UserId
print(usid,amount)
MsgService:PublishAsync(usid.."_TixEarned",amount)
end
end)
My current issue is that Place1 is not recieving the data