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

Help with PointAwarder+Teleport Script..?

Asked by 10 years ago

I am going to try my best to go in as much detail as possible.

What I am trying to do is make a brick that ontouch, you recieve x amount of points, whilst being teleported back to x location. I think I have a good starting base on the recieve part, but my teleport is off.

The thing I want is similar to the mini obby on The Stalker-Clonetrooper1019. I want it to give 10 points awarded to buy an item in the server's shop. Here's what I have for the recieve part (Via LinkLeaderBrd)

1
function.ontouch.give.player.{PLAYER}.points.10
2
    end

Lol. I'm a new scripter, so it will probably be offbase. I'm thinking that would work, but it didn't. Any possible help would be appreciated.

Here's the teleport part. I'm literally 100% confused and any help would be great. I played around with some of my weak knowledge to come up with this. I know it's probably off base, but it's my best work. :p

1
function.ontouch.telelport
2
    local.teleport."Brick1" humanoid
3
    end
4
            end

Call me a noob please! I just started and need some guidelines for my work! Thank you so much!

1 answer

Log in to vote
0
Answered by 10 years ago

For Points (LocalScript) :

Points=1 -- How Many Points
script.Parent.Touched:connect(function() -- onTouched
-- Variables
PointsService=game:GetService'PointsService'
Player=game.Players.LocalPlayer
-- Give Points
PointsService:AwardPoints(Player.userId, Points)
end)
Ad

Answer this question