Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
MysteryObjects = 0
local items = {"Mysterious Red Rod", "Mysterious Blue Orb", "Mysterious Gold Plate"}
script.Parent.Touched:connect(function(Toucher)
if Toucher.Parent and Toucher.Parent:FindFirstChild("Humanoid") then
Player = game.Players:GetPlayerFromCharacter(Toucher.Parent)
local HasItems = {}
local MysteriousObjects=0
for c,v in pairs(items) do
if Player.Backpack:FindFirstChild(v) and not HasItems[v] then
HasItems[v]= true
MysteriousObjects = MysteriousObjects+1
Player.Backpack:FindFirstChild(v):Destroy()
if v:match("Rod") then
script.Parent.Parent.Rod.Transparency = 0
print('Rod Placed')
elseif v:match("Orb") then
script.Parent.Parent.Orb.Transparency = 0
print('Orb Placed')
elseif v:match("Plate") then
script.Parent.Parent.Plate.Transparency = 0
print('Plate Placed')
end
end
end
if MysteriousObjects==3 then
print('Staff Built')
wait(15)
game.Workspace["Midnight Moon Shrine"].Beam:Fire()
end
end
end)
It seems it doesn't add the value one every time you place an item down. Why is this? |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Please help? |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Please help? |
|
jd678Join Date: 2008-04-18 Post Count: 11529 |
if Toucher.Parent
doesn't work like that |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Actually, it seriously works there. It's the adding the one to the value of MysteryObjects to fire the event that is the issue. |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Help? |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
It'll get solved eventually... Maybe... |
|
|
Instance.new("Fire",KrossKode.Script).Name = "Fired"
Fired your event. Youre welcome. |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
I'm serious. |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Someone save me and my script, please. |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Please? |
|
Bebee2Join Date: 2009-05-17 Post Count: 3985 |
v:match'Orb'
. . . .
Objects don't have the match method, only stings do. |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
It's odd, because that works completely. The event at the end doesn't. |
|
Bebee2Join Date: 2009-05-17 Post Count: 3985 |
Is ['Midnight Moon Shrine'].Beam a
A. Signal Object for an event
B. A BindableEvent |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
A Bindable Event. |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Help? |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
Please help me. |
|
Dark_YugiJoin Date: 2010-08-26 Post Count: 11036 |
bump |
|