generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Im getting a little mad and sad

Previous Thread :: Next Thread 
AlacrityS is not online. 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
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 08:39 PM
stop. we dont care.
Report Abuse
AlacrityS is not online. 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
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 08:41 PM
Yes, and it is not about reposting your thread and bumping every single minute.
Report Abuse
AlacrityS is not online. 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
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
16 Jun 2014 08:48 PM
Does it say anything in the output?
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
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
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 08:51 PM
oh lord she got an answer finally praise the "heavens" oh lord "jesus"
Report Abuse
AlacrityS is not online. 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 is not online. 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
EgoRenascitur is not online. EgoRenascitur
Joined: 17 Nov 2013
Total Posts: 1049
16 Jun 2014 09:16 PM
Add a debounce to make it wait before you can press the button again.
Report Abuse
AlacrityS is not online. 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
CordlessTub is not online. CordlessTub
Joined: 12 Apr 2012
Total Posts: 2297
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
CordlessTub is not online. CordlessTub
Joined: 12 Apr 2012
Total Posts: 2297
16 Jun 2014 09:42 PM
Nvm you found a working one
Report Abuse
AlacrityS is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image