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: Help me with this script PLZ!

Previous Thread :: Next Thread 
closeyrufcpros is not online. closeyrufcpros
Joined: 29 Jul 2009
Total Posts: 90
07 Mar 2010 12:48 PM
Okay,What i want the script to do is make a part that when a player touches it gives them the tickets, Here are my TWO Scripts i need you to fix together:

---Tottally all made and scripted,cframed by closeyrufcpros, the DISNEY XD fountain helped alot!Thanks!
local lifetime = 5 ---How long the Ball lasts
while true do
wait(.1)
local pos = script.Parent
local b = Instance.new("Part") ---makes a new Part!

b.Position = pos.Position + pos.CFrame.lookVector ---Cframing object
b.Size = Vector3.new(1, 1, 1) b.Shape = 0 ---Makes sure its a Ball not square,also means CFAMING lol
b.BrickColor=BrickColor.new("Orange") ---Colour
b.Transparency = 0.0 ---Transparent?False!Looks like a face( 0.0 ) lawl!
b.TopSurface = "Smooth" ---I DONT WANT IT ROUGhth NOW DO I!
b.BottomSurface = "Smooth" ---Same here!
b.CanCollide = false ---I really dont like cancolliding much...Does my HEADING!
b.Parent = game.Workspace ---Finds where to put the brick,We dont want a blue ball Skybox or humanoid do we now?
b.Velocity = Vector3.new(1, 75, 1) ---Cframing???SURE!
game:GetService("Debris"):AddItem(b, lifetime) ---Debris...tottally idk wat it is,Never gunnah care!
end ---THE SCRIPTS ENDED!


Other Script:

amnt = 2
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid") ---Finds robloxian who touches
if (h~=nil) then
local thisplr = game.Players:findFirstChild(h.Parent.Name) ---Learns their name and gives tickets
if (thisplr~=nil) then
local stats = thisplr:findFirstChild("leaderstats") ---Finds where your name is,looks accross
if (stats~=nil) then
local score = stats:findFirstChild("Tickets") ---Finds tickets leaderboard,Adds 2 Tickets
if (score~=nil) then
score.Value = score.Value + amnt ---Finds the ammount of Tickets given so no overload,if No ammt script wont work.
end
end
end
script.Parent:remove() ---Removes script and object
end
end

script.Parent.Touched:connect(onTouched) ---Means "When player touches it gives tickets and the brick and script Dissapeers"

Id be SOOO GRATEFULL IF YOU COULD FIX!

Thanks!
closeyrufcpros!
Report Abuse
xXxXxdragonxXxXx is not online. xXxXxdragonxXxXx
Top 100 Poster
Joined: 30 Dec 2008
Total Posts: 30113
07 Mar 2010 01:00 PM
local lifetime = 5
while true do
wait(.1)
local pos = script.Parent
local b = Instance.new("Part")

b.Position = pos.Position + pos.CFrame.lookVector
b.Size = Vector3.new(1, 1, 1) b.Shape = 0
b.BrickColor=BrickColor.new("Black")
b.Transparency = 0
b.TopSurface = "Smooth"
b.BottomSurface = "Smooth"
b.CanCollide = false
b.Parent = game.Workspace
b.Velocity = Vector3.new(1, 75, 1)
game:GetService("Debris"):AddItem(b, lifetime)
end
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