Issue with Creation of Objects

Hello! I’m having some issues with!

It is likely that the issue is obvious, and I’m just simply blind.

The issue is that I have a set of lines creating Instances, but for some reason, they don’t match what it ends up making.

--Create Area for Data 3D Conversion
	local DataSavingSystem = game:GetService("ServerStorage"):WaitForChild("DataSavingCache",99999)
	local Main ="Folder",DataSavingSystem); Main.Name = tostring(UserID)
	local DonationData ="Folder",Main); DonationData.Name = "Donations"
	local DebugData ="Folder",Main); DebugData.Name = "Debug"
	local PlaytimeData ="Folder",Main); PlaytimeData.Name = "Playtime"
	local MatchtimeData ="Folder",Main); MatchtimeData.Name = "Matchtime"
	local KnockData ="Folder",Main); KnockData.Name = "KnockRatio"
	local StreakData ="Folder",Main); StreakData.Name = "Streaks"
--Create Value Objects Under Folders.
	local AmountDonated ="NumberValue",DonationData); AmountDonated.Name = "AmountDonated"
	local IsInRing ="BoolValue",DebugData); IsInRing.Name = "IsInRing"
	local IsDead ="BoolValue",DebugData); IsDead.Name = "IsDead"
	local AverageSessionLength ="NumberValue",PlaytimeData); AverageSessionLength.Name = "AverageSessionLength"
	local LongestSessionLength ="NumberValue",PlaytimeData); LongestSessionLength.Name = "LongestSessionLength"
	local MatchTimeAverage ="NumberValue",MatchtimeData); MatchtimeData.Name = "TimeAverage"
	local KnockAverage ="NumberValue",KnockData); KnockAverage.Name = "KnockAverage"
	local LossAverage ="NumberValue",KnockData); LossAverage.Name = "LossAverage"
	local WinAverage ="NumberValue",KnockData); WinAverage.Name = "WinAverage"
	local BestStreak ="NumberValue",StreakData); BestStreak.Name = "BestStreak"
	local CurrentStreak ="NumberValue",StreakData); CurrentStreak.Name = "CurrentStreak"

This is what it’s creating:

As you can see, the child of TimeAverage doesn’t have a name, and the folder named “Matchtime” the script should be making isn’t present.

What am I doing wrong? I’m kind of tired, so I’m assuming that’s related, and I’m just missing it.

local MatchTimeAverage ="NumberValue",MatchtimeData); MatchtimeData.Name = "TimeAverage"

Do you see it?


You are setting MatchtimeData’s name instead of the actual value.

1 Like