im trying to send a texture string to the players inventory gui to create a new icon, but its saying the texture is nil even though i print the value im sending before sending it and it prints the value
SERVERSIDE
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local pets = petDS:GetAsync(player.userId) or {}
for i, v in pairs(pets) do
local tex = tostring(v.tex)
print("texture is ".. tex)
game.ReplicatedStorage.REs.ADDRAT:FireClient(player,tex)
end
end)
end)
LOCAL
game.ReplicatedStorage.REs.ADDRAT.OnClientEvent:Connect(function(player,texture)
print("adding ".. texture .. " to inv")
local pet = game.ReplicatedStorage.INVPET:Clone()
pet.Parent = script.Parent
pet.GUIRAT.Mesh.TextureId = texture
end)
ERROR