I have a part and I want it when a player touches It, It gives them a tool and takes away their health. So I need access to their character in Workspace defined as a variable and to their Backpack.
function Touch(player)
local player = game.Players:FindFirstChild("player")
local character = game.Workspace:FindFirstChild("player")
game.ServerStorage.Tool:Clone().Parent = player.Backpack
character.Health = character.Health - 50
end
script.Parent.Touched:connect(Touch)
