hello devs
I got some help setting up my first RemoteEvent yet it still doesn't work and gives the error
FireServer is not a valid member of script
my tiny brain is not following why its happening due to looking at the script and its flawless (to me)
my local script(inside a shop GUI) is
local Event = game.ReplicatedStorage.PetRemote Event:FireServer(petName)
and my remote event (RepStorage) is
local Event = Instance.new(game.ReplicatedStorage.PetRemote) Event.Name = "PetRemote" Event.OnServerEvent:Connect(function(Player,Value) print("Value received from client, Player:",Player.Name,"Value:",Value) end)
Won't Print
I don't understand what you're doing. Here, make sure there's already a remote in ReplicatedStorage called "PetRemote":
local Event = game:GetService("ReplicatedStorage"):WaitForChild("PetRemote") -- Getting the remote, I don't know why you did Instance.new Event.OnServerEvent:Connect(function(Player,Value) print("Value received from client, Player:",Player.Name,"Value:",Value) end)
Hope this helps