I'm just trying to make an exe horror game, and i know i got alot of fe stuff to make and i really need help on this. I could learn from questions you put down, maybe i can learn from it.
I hope you can help me out a lil' and i don't want to act like an idiot here.
--LocalScript
script.Parent.CD.MouseClick:Connect(function(player)
game.ReplicatedStorage.GiveRegularKey:FireServer()
end)
--ServerScript
local client = game.Players.LocalPlayer
game.ReplicatedStorage.GiveRegularKey.OnServerEvent:Connect(function()
game.ReplicatedStorage.key:Clone().Parent = client.Backpack
end)

1 comment
Although I do not specialize in Local-Server communications, I can right away assume that "client" is nil. The server cannot get "LocalPlayer" from Players since it's not a localscript