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 » Scripters
Home Search
 

Re: How?

Previous Thread :: Next Thread 
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 08:13 PM
local Mountains = script.Parent:WaitForChild("Mountains"):WaitForChild("Frame")



for i,v in next, Mountains:GetChildren() do
v:WaitForChild("Main").MouseButton1Click:connect(function()
if v:FindFirstChild("LOCKED")==nil then
game["Teleport Service"]:Teleport(v:WaitForChild("PlaceID").Value)
else
print("Thats Locked")
end
end)
end


So I have 2 frames named Mountains (The one used in this script) and another one named Mountains2 how do I make this script work for both without using another script?
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
19 May 2015 08:14 PM
just make a table of the mountains
e.i

local All_Mountains = { script.Parent:WaitForChild("Mountains"):WaitForChild("Frame"), script.Parent:WaitForChild("Mountains2"):WaitForChild("Frame")}

for i,v in next, All_Mountains do
for ii,vv in next,v:GetChildren() do
vv:WaitForChild("Main").MouseButton1Click:connect(function()
if vv:FindFirstChild("LOCKED")==nil then
game["Teleport Service"]:Teleport(v:WaitForChild("PlaceID").Value)
else
print("Thats Locked")
end
end)
end
end
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 08:15 PM
Heres wut i got


local All_Mountains = { script.Parent:WaitForChild("Mountains"):WaitForChild("Frame"), script.Parent:WaitForChild("Mountains2"):WaitForChild("Frame")}

for i,v in next, All_Mountains do
for ii,vv in next,v:GetChildren() do
vv:WaitForChild("Main").MouseButton1Click:connect(function()
if vv:FindFirstChild("LOCKED")==nil then
game["Teleport Service"]:Teleport(v:WaitForChild("PlaceID").Value)
else
print("Thats Locked")
end
end)
end
end

local shop = script.Parent:WaitForChild("Shop")
local gamepassShop = script.Parent:WaitForChild("GamepassShop")
local button1 = shop:WaitForChild("Back"):WaitForChild("Button")
local button2 = gamepassShop:WaitForChild("Back"):WaitForChild("Button")

button1.MouseButton1Click:connect(function()
if script.Parent.Position == UDim2.new(1,0,0.05,0) then
script.Parent:TweenPosition(UDim2.new(0.025,0,0.05,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,2)
end
end)

button2.MouseButton1Click:connect(function()
if script.Parent.Position == UDim2.new(-1,0,0.05,0) then
script.Parent:TweenPosition(UDim2.new(0.025,0,0.05,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,2)
end
end)

local shops = script.Parent:WaitForChild("Shops")
local Shop = shops:WaitForChild("Shop")
local gamepass = shops:WaitForChild("Gamepasses")

Shop:WaitForChild("Button").MouseButton1Click:connect(function()
if script.Parent.Position == UDim2.new(0.025,0,0.05,0) then
script.Parent:TweenPosition(UDim2.new(1,0,0.05,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,2)
end
end)

gamepass:WaitForChild("Button").MouseButton1Click:connect(function()
if script.Parent.Position == UDim2.new(0.025,0,0.05,0) then
script.Parent:TweenPosition(UDim2.new(-1,0,0.05,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,2)
end
end)

for i,v in next, shop:WaitForChild("Items"):WaitForChild("Frame"):GetChildren() do
v:WaitForChild("Button").MouseButton1Click:connect(function()
game.MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer,v:WaitForChild("DevProductID").Value)
end)
end

for i,v in next, gamepassShop:WaitForChild("Items"):WaitForChild("Frame"):GetChildren() do
v:WaitForChild("Button").MouseButton1Click:connect(function()
game.MarketplaceService:PromptPurchase(game.Players.LocalPlayer,v:WaitForChild("GamepassID").Value)
end)
end



it aint work



also the bottom stuff is for other stuff
Report Abuse
GeoVolcano is not online. GeoVolcano
Joined: 05 Jul 2012
Total Posts: 1433
19 May 2015 08:16 PM
tl;dr
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
19 May 2015 08:17 PM
lol there's no way i am converting all of that.
I gave you the basic idea.
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 08:23 PM
I never said 2 convert all of it.


I just said it aint working
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 08:47 PM
bump
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 09:26 PM
aasd
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 09:48 PM
bump
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 10:02 PM
bump
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
19 May 2015 10:35 PM
STOP BUMPING IT
NOW ONE IS GOING TO FIX YOUT 1025823059238532 LINE SCRIPT

Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 10:48 PM
not really that long its only liek 100-200 lines
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
19 May 2015 10:50 PM
EXACTLY

get out
Report Abuse
TheBlueRivers is not online. TheBlueRivers
Joined: 20 Jul 2011
Total Posts: 2555
19 May 2015 10:50 PM
58 lines
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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