of     1   

stuntrally8
#36325726Monday, November 01, 2010 1:01 AM GMT

bin = script.Parent function onButton1Down(mouse) random = math.random(1,3) pos = game.Players.LocalPlayer.Character.PrimaryPart.Position if random == 1 then wait(2) zom = script.Parent.TZombie:clone() zom.Name = script.Parent.Parent.Parent.Name.. "'s Curse" zom.Target.Value = script.Parent.Parent.Parent.Name zom.Parent = game.Workspace zom:MakeJoints() zom:MoveTo(pos) else if random == 2 then wait(2) zom = script.Parent.HZombie:clone() zom.Name = script.Parent.Parent.Parent.Name.. "'s Helper" zom.Target.Value = script.Parent.Parent.Parent.Name zom.Parent = game.Workspace zom:MakeJoints() zom:MoveTo(pos) else game.Players.LocalPlayer.Character:MoveTo(game.Workspace.TeleTo.Position) end end script.Parent:remove() end function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onSelected) It always teles you to the TeleTo brick.
AJtn12
#36327915Monday, November 01, 2010 1:44 AM GMT

bin = script.Parent function click() random = math.random(1,3) pos = game.Players.LocalPlayer.Character.PrimaryPart.Position if (random == 1) then wait(2) zom = script.Parent.TZombie:clone() zom.Name = script.Parent.Parent.Parent.Name.. "'s Curse" zom.Target.Value = script.Parent.Parent.Parent.Name zom.Parent = game.Workspace zom:MakeJoints() zom:MoveTo(pos) else if (random == 2) then wait(2) zom = script.Parent.HZombie:clone() zom.Name = script.Parent.Parent.Parent.Name.. "'s Helper" zom.Target.Value = script.Parent.Parent.Parent.Name zom.Parent = game.Workspace zom:MakeJoints() zom:MoveTo(pos) else game.Players.LocalPlayer.Character:MoveTo(game.Workspace.TeleTo.Position) end end script.Parent:remove() end function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" MouseButton1Click:connect(function() click end) end bin.Selected:connect(onSelected) ------------------------------------------------------------- Fixed a few bugs and changed MouseButton1Down to MouseButton1Click.
stuntrally8
#36337759Monday, November 01, 2010 11:18 AM GMT

Hmm... That seems to break it.
stuntrally8
#36337945Monday, November 01, 2010 11:40 AM GMT

Now I've got this: bin = script.Parent function onButton1Down(mouse) r = math.random(1,3) print(r) pos = game.Players.LocalPlayer.Character.PrimaryPart.Position if r == 1 then print("1 chosen") wait(2) zom = script.Parent.TZombie:clone() zom.Name = script.Parent.Parent.Parent.Name.. "'s Curse" zom.Target.Value = script.Parent.Parent.Parent.Name zom.Parent = game.Workspace zom:MakeJoints() zom:MoveTo(pos.x + 5, pos.y, pos.z) else if r == 2 then print("2 chosen") wait(2) zom = script.Parent.HZombie:clone() zom.Name = script.Parent.Parent.Parent.Name.. "'s Helper" zom.Target.Value = script.Parent.Parent.Parent.Name zom.Parent = game.Workspace zom:MakeJoints() zom:MoveTo(pos.x + 5, pos.y, pos.z) else game.Players.LocalPlayer.Character:MoveTo(game.Workspace.TeleTo.Position) print("3 chosen") end end script.Parent:remove() end function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onSelected) But whenever it selects option 1 or 2, it says "Cannot cast double Vector3" and points to the MoveTo line.

    of     1