I have a really strange problem here that manifests itself on the LIVE server only. Works fine in Studio. Consider the following code:
local function newValue(player, damage, folder) local tag tag = Instance.new("Vector3Value") tag.Name = player.UserId tag.Value = Vector3.new(player.UserId, time(), damage) tag.Parent = folder print("Tag Create", tag, tag.Value) end
This function is part of my player tagging system. So when a player damages another player or NPC, a tag is created that specifies the user id of the damaging player (X), the server time (Y), and the damage done (Z). If the tag already exists, then the Y and Z values are updated.
With that being said, somehow the player’s user id is getting mangled when stored in the Vector3. Here’s a partial screen shot documenting what I’m talking about.
I checked for a datatype mismatch between the player’s user id and the XYZ components of the Vector3. Both say that the base type are numbers. But, in the Vector3, it looks like the least significant bits are being mangled somehow as the first few numbers are the same. I realize that number is a floating point type, so could there be a representation problem? Or, could there be something inherent to Vector3 that’s causing it?
This is game breaking as it’s causing the script to error out and players don’t get their rewards. I could use a string value in place of the Vector3 if push comes to shove, but I would rather not use that solution unless I have to.