So I am making an item giver so when you click the part, it clones an item from ReplicatedStorage. Here is the code:
local player = game.Players.LocalPlayer
function onClicked()
game.ReplicatedStorage.PaperSlip:clone().Parent = player.Backpack
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
It's in a localscript and it's right inside the part. I have a clickdetector right inside the part too, so I don't know what I did wrong, but it's not doing anything when I click it. Someone please help!

3 comments
Is your Script disabled?
No it isn't
Regular scripts can't access LocalPlayer. Also, LocalScripts don't work in workspace.