|
| 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 |
|
|
| 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 |
|