Okay, so my code is supposed to award the player a player point, destroy the part, wait a minute, then put the part back in its spot. The problem is, it doesent do A SINGLE THING I told it to do. Plz help. Here's my code.
function eggCollect(hit)
local db = false
if not hit.Parent:FindFirstChild("Humanoid") or db then return end
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
db = true
PointsService:AwardPoints(player.userId, 1)
db = false
print 'Player points awarded'
end
script.Parent:Destroy()
wait(60)
script.Parent:Clone()
end
script.Parent.Touched:connect(onTouch)
ALSO my workspace looks like this:
^Workspace ^BasicEgg Mesh Script that I'm using

1 comment
Also, refer to http://wiki.roblox.com/index.php?title=Points_tutorial