AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 08:39 PM |
i want it to award a person who touches a brick get awarded 10 PP
And i also want it to teleport you back to the lobby because the obby is inside on a lobby
So how would i do that? I currently have a script but it wont teleport back to the lobby nor give PP
Iv tried everything have been been going at it for the whole day
ready = true
local button = script.Parent local amountontouch = 10 local PointsService = game:GetService("PointsService") local availablepoints = PointsService:GetAwardablePoints()
local returnto = Workspace.Lobby.ReturnFromObby
button.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) local character = player.Character if player and ready and (availablepoints > 10) then ready = false PointsService:AwardPoints(player.userId, 10) character.Torso.CFrame = CFrame.new(returnto.CFrame.X, returnto.CFrame.Y + 7, returnto.CFrame.Z) wait() ready = true end end)
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,059 / 90,000 |
|
|
| Report Abuse |
|
|
| |
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 08:40 PM |
@Sen, This is scripting helpers is it not? lol
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,059 / 90,000 |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 08:41 PM |
| Yes, and it is not about reposting your thread and bumping every single minute. |
|
|
| Report Abuse |
|
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 08:42 PM |
I dont bump it every minute
Geez man u got issues
Calm yourself?
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,059 / 90,000 |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 08:48 PM |
| Does it say anything in the output? |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 08:50 PM |
ready = true
local button = script.Parent local amountontouch = 10 local PointsService = game:GetService("PointsService") local availablepoints = PointsService:GetAwardablePoints()
local returnto = Workspace.Lobby.ReturnFromObby
button.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) local character = player.Character local availablepoints = PointsService:GetAwardablePoints() --if you don't reassign, itll stay at w/e if player and ready and (availablepoints > 10) then ready = false PointsService:AwardPoints(player.userId, 10) character.Torso.CFrame = CFrame.new(returnto.CFrame.X, returnto.CFrame.Y + 7, returnto.CFrame.Z) wait() ready = true end end)
|
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 08:51 PM |
| oh lord she got an answer finally praise the "heavens" oh lord "jesus" |
|
|
| Report Abuse |
|
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 08:55 PM |
oh my god it worked
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,059 / 90,000 |
|
|
| Report Abuse |
|
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 09:12 PM |
New problem, It only worked once then stopped
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,081 / 90,000 |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 09:16 PM |
| Add a debounce to make it wait before you can press the button again. |
|
|
| Report Abuse |
|
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 09:37 PM |
Not a button you walk over it and idk how to do that
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,187 / 90,000 |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 09:41 PM |
This should work for the player point part....
script.Parent.Touched:connect(function(hit) if script.Parent:FindFirstChild("Humanoid") then game:GetService("PointsService"):AwardPoints(game.Players:FindFirstChild(hit.Parent.Name).userId, 10) wait() end end) |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 09:42 PM |
| Nvm you found a working one |
|
|
| Report Abuse |
|
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 09:50 PM |
Yes i found a working one cordless but it only works once... After one time use it doesnt work
Idk how to make it always work
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,137 / 90,000 |
|
|
| Report Abuse |
|
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 09:55 PM |
So like every server, After you touch it once, It doesnt work
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,135 / 90,000 |
|
|
| Report Abuse |
|
|
AlacrityS
|
  |
| Joined: 16 Jun 2012 |
| Total Posts: 23590 |
|
|
| 16 Jun 2014 10:02 PM |
:\
Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,133 / 90,000 |
|
|
| Report Abuse |
|
|