Local Script
local Equip = script.Parent
local InvHandler = game.Players.LocalPlayer.PlayerGui.InventoryHandler
local UpperInv = InvHandler.UpperInv
local MaxPetLimit = UpperInv.MaxPetLimit
local PetLimitText = MaxPetLimit.PetLimitText
local PetPreview = UpperInv.PetPreview
local PetPreviewFrame = PetPreview.PetPreviewFrame
local Im = PetPreviewFrame.PetPreviewImage
-- We just defined all the UI elements
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BasicEggPetFolder = ReplicatedStorage.BasicEggPetFolder
local Cat = BasicEggPetFolder.Cat
local Dog = BasicEggPetFolder.Dog
local Mouse = BasicEggPetFolder.Mouse
local Dragon = BasicEggPetFolder.Dragon
local GrassyCat = BasicEggPetFolder.GrassyCat
local TeaMonster = BasicEggPetFolder.TeaMonster
-- Pet Vars
local plr = game.Players.LocalPlayer
local char = plr.Character
local db = false
Equip.MouseButton1Click:Connect(function()-- when the player clicks the equip button the inventory
db = true
if Im.Image =="rbxassetid://7620353586" then-- checks if the pet is correct
local Clo1 = Cat:Clone()
local StatsValue = Instance.new("StringValue")
StatsValue.Parent = Clo1
StatsValue.Value = "Equipped"
Clo1.Parent = char
local EquipPet = ReplicatedStorage.EquipPet
EquipPet:Fire(Clo1)
-- EquipPet is a remoteEvent
db = false
end
end)
The remote event is not working and here is the error
Fire is not a valid member of RemoteEvent "ReplicatedStorage.EquipPet
:Fire is not a function for Remote Event. You must use FireClient(player) or FireAllClients.
Also which part is the Server side and which part is the client side?
It’s a local script, as you can see on the top.
I did FireServer() and it worked
1 Like
Oh yea, good. Sorry I thought it was the Server Script.