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

01part.script.Parent
02if part debounce false then
03part.onTouched (givePoints)
04 
05part.function givePoints()
06when Player.onTouched.part.leftleg:connect(givePoints)
07givePoints.math.pi (1)
08--this will tell you the amount of points is going to be given when touched
09--do stuff
10end
11game.Player.PlayerPoints .givePoints= (1)
12wait (0.4)
13- Bind function to when points are successfully awarded
14PointsService.PointsAwarded:connect(function(userId, userBalanceinUni, userBalance)
15    -- Show message indicating that a player has gotten points
16    local message = Instance.new('Message', game.Workspace)
17    message.Text = "Point awarded to " .. userId .. ". This player now has " .. userBalance .. " points total!"
18    wait(5)
19    message:Destroy()
20end)
Ad