Hello Fellow Devs! I am having some troubles with the Client Not Picking Up A Remote Event.
-
What do you want to achieve? I just want, the local script to print(“Picked Up On Client!”)
-
What is the issue? I am firing a RemoteEvent Called “SendData” And The Client Won’t print it! And I have no clue what’s happening!
-
What solutions have you tried so far? I have read the whole thing, I can’t find any spelling errors!
There is no errors in the output, there is only “Fired SendData” If you could help it would be amazing!! (The code is down below!)
(This is a script inside ServerScriptService)
game.Players.PlayerAdded:Connect(function(player)
local skinInventory = Instance.new("Folder")
skinInventory.Name = "SkinInventory"
skinInventory.Parent = player
local equippedGun = Instance.new("StringValue")
equippedGun.Name = "EquippedGun"
equippedGun.Parent = player
local data = SkinDataStore:GetAsync(player.UserId.."-skin")
if data then
for i, petName in pairs(data) do
if game.ReplicatedStorage:WaitForChild("Pets"):FindFirstChild(petName) then
local stringValue = Instance.new("StringValue")
stringValue.Name = petName
stringValue.Parent = player.SkinInventory
end
end
game.ReplicatedStorage.SendData:FireClient(player,data)
print("Fired SendData!")
else
print("No Data Found, Must Be a New Player or something happened to the data")
end
end)
(This is a local script inside a ScreenGui)
game.ReplicatedStorage.SendData.OnClientEvent:Connect(function(data)
print("Picked Up On Client!")
for i, petName in pairs(data) do
if game.ReplicatedStorage.Pets:FindFirstChild(petName) then
addToFrame(game.ReplicatedStorage.Pets:FindFirstChild(petName))
end
end
end)