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: I wanna make it so that when you touch a block it awards you

Previous Thread :: Next Thread 
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 04:47 PM
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

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,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 04:49 PM
B1

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 04:51 PM
B2

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 04:52 PM
B3

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 04:53 PM
B4

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 04:54 PM
B5

Y wont anyone help

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
16 Jun 2014 04:56 PM
Yore incredibly impatient.

Wait a bit.
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
16 Jun 2014 04:58 PM
yes, i know in lmad u guys bump every minute or something, but not anywhere else, so be patient. and

"local availablepoints = PointsService:GetAwardablePoints()"

is at the start of the script, meaning it only gets the available points once when the script first runs.
try putting this variable in the function.

Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 04:59 PM
@Vert, Can u do that for me

Idk how D:

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:01 PM
;c

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
16 Jun 2014 05:02 PM
...

r u srs

I wonder if I was ever that bad.
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:04 PM
Stfu^

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:06 PM
D:

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
16 Jun 2014 05:08 PM
"if player and ready and (availablepoints > 10) then"

if player and ready and (PointService:GetAvailablePoints() > 10) then
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
16 Jun 2014 05:08 PM
Stop bumping this so fast.

Do you seriously have nothing better to do with your life!?
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:10 PM
@Duel Would that make the script work?

Because the teleport thing doesnt work either

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:13 PM
@Duel, Still doesnt work

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
16 Jun 2014 05:16 PM
too lazy to read more, so no I am not helping much longer
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:16 PM
Well pls fix it ;c,

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:17 PM
;c

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
16 Jun 2014 05:19 PM
Now I see how you have 17000 posts. You're just a spammer.


Your problem is so easily fixable.
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 05:19 PM
STOP
BUMPING
EVERY
MINUTE
Report Abuse
AlacrityS is not online. AlacrityS
Joined: 16 Jun 2012
Total Posts: 23590
16 Jun 2014 05:20 PM
Ill keep bumping until its fixed

Swimmin' in the ocean. Causin' a commotion. ~//Was InternalFrost\\~ R$16,040 / 90,000
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
16 Jun 2014 05:20 PM
there is something called an output
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
16 Jun 2014 05:22 PM
I hope no one helps you until you stop spamming.
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