✓ Accepted answer
First of all, you're doing 2 things wrong here.
Assuming that this is a Local Script, you can not access ServerStorage through client. (the name is ServerStorage for a reason)
If it's not a local script, then you're trying to use LocalPlayer inside a server script, which once again, is not possible.
Secondly, you're cloning the player into the players backpack? Don't really understand what you're trying to do.
Anyway, to fix this, make it a Local Script, put the item inside replicated storage, and do this :
local player = game.Players.LocalPlayer
local item = game:GetService('ReplicatedStorage')['Teddy']
script.Parent.MouseButton1Click:Connect(function()
item:Clone().Parent = player.Backpack
end)
2 comments
Oh, I am so sleepy today. Thanks, this has solved my problem!
thats the exact code i was gonna type ;-;