|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
|
| 19 May 2015 08:23 PM |
I never said 2 convert all of it.
I just said it aint working |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
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 |
|
|
|
| 19 May 2015 10:48 PM |
| not really that long its only liek 100-200 lines |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
| |
|
| |
|