Everytime the "Win" part is touched, it comes up with the same error:
ServerScriptService.EventHandler:3: attempt to call method 'FindFirstChild' (a nil value)
This also goes for "WaitForChild"
If you are wondering, without the "FindFirstChild" or the "WaitForChild", it comes up with this:
ServerScriptService.EventHandler:3: attempt to index field 'leaderstats' (a nil value)
Here's my line of code:
game.ServerScriptService.EventHandler
game.ReplicatedStorage.Events.Coins.Event:connect(function(player, coins)
wait()
player:FindFirstChild("leaderstats").Coins.Value = player:FindFirstChild("leaderstats").Coins.Value + coins
end)
game.Workspace.Lobby.ObbyParts.Win.AwardCoins
local part = script.Parent.Parent.Teleport
script.Parent.Touched:connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") then
local player = touch.Parent.Name
local difficulty = game.Workspace.Lobby.ObbyParts.Map:FindFirstChildOfClass("Model").Difficulty.Value
print(player.." has beaten the "..difficulty.." obby!")
if difficulty == "Easy" then
game.ReplicatedStorage.Events.Coins:Fire(player, 5)
elseif difficulty == "Medium" then
game.ReplicatedStorage.Events.Coins:Fire(player, 10)
elseif difficulty == "Hard" then
game.ReplicatedStorage.Events.Coins:Fire(player, 25)
elseif difficulty == "Very Hard" then
game.ReplicatedStorage.Events.Coins:Fire(player, 50)
elseif difficulty == "Insane" then
game.ReplicatedStorage.Events.Coins:Fire(player, 100)
end
wait()
if touch.Parent:FindFirstChild("UpperTorso") then
touch.Parent.UpperTorso.CFrame = part.CFrame
elseif touch.Parent:FindFirstChild("Torso") then
touch.Parent.Torso.CFrame = part.CFrame
end
end
end)
Any help appreciated, thanks.

4 comments
I did everything you told me to, and it comes up with an error: "ServerScriptService.EventHandler:3: attempt to index field 'leaderstats' (a nil value)", the same when I removed "WaitForChild" or "FindFirstChild" on the same line.
That means 'player' is still a string. Use print commands to help figure out what's going on; you can print(type(player)) to make sure that it's "userdata" instead of "string". Double check the information you're sending to the event.
The first time I used "print(type(player))", it printed "userdata", but still came up with the same error.
Edited the answer - try what I suggest at the bottom. If that still doesn't work, try printing "print(typeof(player))" and "print(player.ClassName)"?