You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I want remoteevent to fire correct data
-
What is the issue? RemoteEvent fire wrong data
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? Yes I have
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
MESSY ALERT (Script)
print(currentData) --Line 24
currentData[num] = value
print(currentData) -- Line 28
Data:SetAsync(player.UserId, currentData)
print(currentData) -- Line 32
SetData:FireClient(player, currentData)
CodeManager (LocalScript)
SetData.OnClientEvent:Connect(function(data)
print(data) --Line 770
for num, value in pairs(data) do
data[tonumber(num) or num] = value
end
print(data) --Line 776
CodeData = data
end)
Output:
{
[1] = true
} - Server - MESSY ALERT:24
18:41:32.558 ▼ {
[1] = true,
[13] = true
} - Server - MESSY ALERT:28
18:41:33.258 ▼ {
[1] = true,
[13] = true
} - Server - MESSY ALERT:32
18:41:33.292 ▼ {
[1] = true
} - Client - CodeManager:770
18:41:33.292 ▼ {
[1] = true
} - Client - CodeManager:776
SetData is a remote, Same for all
Thanks for reading, Feel free to ask me for something!