Hey Devs,
I have a local script that fires a Random Pet Module and ONLY Prints the pets name
when I go to fire a remote event after to have it give a string value to the player they are different its a different value from the printed pet name…
pretty sure cause I’m calling on the random pet module to make the string as well
but wondering if possible to call from the original chooseRandomPet()…
local petModule = require(game.ReplicatedStorage:WaitForChild("PetModule"))
local repStorage = game:GetService("ReplicatedStorage") local pet = petModule.chooseRandomPet() local player = game:GetService("Players").LocalPlayer
local petVal = Instance.new("StringValue")
local event = Instance.new("RemoteEvent") event.Name = "PetRemote" event.Parent = game:GetService("ReplicatedStorage")
event.OnServerEvent:Connect(function(player, petName)
petVal.Name = pet.Name petVal.Parent = player.PetInventory
end)```