I am trying to give a tool to the player who clicked the button but it gives me an error
The code:
local plr = game:Getservice("Players")
local Rep = game:GetService("ReplicatedStorage")
local Context = game:GetService("ContextActionService")
local function Buttons(Player)
local Tool = Rep.HyperlaserGun:Clone()
Tool.Parent = plr.LocalPlayer.Backpack
end
local Playerr = Instance.new("Player")
Buttons(Playerr)
Context:BindAction("MB",Buttons,true,Enum.KeyCode.T)
Context:SetPosition("MB",UDim2.new(1,-70,0,10))
Context:SetTitle("MB","Get tool")
The error: