I want a brick to award 1 point on touch, So how do i do this?
COMMUNITY QUESTION
How do i make a block award player points on touch?
1 answer
I'm not too sure if this will work
part.script.Parent
if part debounce false then
part.onTouched (givePoints)
part.function givePoints()
when Player.onTouched.part.leftleg:connect(givePoints)
givePoints.math.pi (1)
--this will tell you the amount of points is going to be given when touched
--do stuff
end
game.Player.PlayerPoints .givePoints= (1)
wait (0.4)
- Bind function to when points are successfully awarded
PointsService.PointsAwarded:connect(function(userId, userBalanceinUni, userBalance)
-- Show message indicating that a player has gotten points
local message = Instance.new('Message', game.Workspace)
message.Text = "Point awarded to " .. userId .. ". This player now has " .. userBalance .. " points total!"
wait(5)
message:Destroy()
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
May we see your attempt at the script? This is not a request site.