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)

11
2function.ontouch.give.player.{PLAYER}.points.10
32
4    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

11
2function.ontouch.telelport
32
4    local.teleport."Brick1" humanoid
53
6    end
74
8            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) :

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

Answer this question