This wasn't very specific, so I didn't know what to look for to fix. It's for a Halloween game I'm making, coming 2015 btw. Here's the script:
script.Parent.Touched:connect(function(touchedEffect)
local localplayer = hit.Parent
wait(0.1)
script.Parent.Transparency = 1
script.Parent.CanCollide = false
script.Parent.Script.Disabled = true
localPlayer.leaderstats.Pumpkins.Value = Player.leaderstats.Pumpkins.Value +1
wait(10)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
script.Parent.Script.Disabled = false
end)
And yes, I do have a leaderstats script. Anybody know what could be wrong?
EDIT
Okay, okay, I came up with this script for test solo, but no player is going to be called Player1. How would I get the actual players in the game? Oh, and here's the script (might be helpful):
wait(1)
local character = game.Workspace.Player1
local player = game.Players:GetPlayerFromCharacter(character)
if player then
script.Parent.Touched:connect(function(touchedEffect)
wait(0.1)
script.Parent.Transparency = 1
script.Parent.CanCollide = false
script.Parent.Script.Disabled = true
player.leaderstats.Pumpkins.Value = player.leaderstats.Pumpkins.Value +1
wait(10)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
script.Parent.Script.Disabled = false
end)
end

2 comments
I am new-ish at this whole scripting thing, I thought that hit would automatically get the player object, because they HIT the script's parent.
You also forgot, there is no "hit", so it would be nil.