Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a block award player points on touch? [closed]

Asked by
ekosi 4
10 years ago

I want a brick to award 1 point on touch, So how do i do this?

0
May we see your attempt at the script? This is not a request site. M39a9am3R 3210 — 10y

Closed as Not Constructive by HexC3D, ImageLabel, TheeDeathCaster, and Articulating

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 10 years ago

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)
Ad