Roblox In-Sider
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Lesson: Hopperbins

4 posters

Go down

Lesson: Hopperbins Empty Lesson: Hopperbins

Post  Justgoaway1 Sun Mar 23, 2008 10:29 am

Hey, I have been doing pretty good with hopperbins lately. Here's is a piece of one of my hopperbins:

bin = script.Parent



function onButton1Down(mouse)
local player = game.Players.LocalPlayer
if player == nil then return end
--Insert what you want to happen here
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"

end

function onSelected(mouse)
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)


You can make yourself teleport, die, explode, mainly anything with that bit of info! Now lets move on to targets!

bin=script.Parent
function onButton1Down(mouse)
print("Clicked")
t= mouse.Target
if t~=nil and t.className == "Part" then
--Insert what you want to happen here
end
end

function onSelected(mouse)
print("Selected")
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)

Naturally, if you want it so it happens when you click on a certain button, you can put:

if (t.Name == "Blah") then

You could put the name of the brick you want where "Blah" is, but be sure to put it in quotes!
Justgoaway1
Justgoaway1
Newbie
Newbie

Posts : 10
Join date : 2008-03-23
Location : Somewhere under the rainbow.

Back to top Go down

Lesson: Hopperbins Empty Re: Lesson: Hopperbins

Post  Intile Sun Mar 23, 2008 5:25 pm

Not really a tutorial, more showing a big script and how it works. Oh well, 7/10.

>Int<
Intile
Intile
Admin
Admin

Posts : 10
Join date : 2008-03-22

Back to top Go down

Lesson: Hopperbins Empty Re: Lesson: Hopperbins

Post  bloo135isback Sun Mar 23, 2008 7:57 pm

yeah he must b right o_O Very Happy

bloo135isback
Beginner Poster
Beginner Poster

Posts : 15
Join date : 2008-03-22

Back to top Go down

Lesson: Hopperbins Empty Re: Lesson: Hopperbins

Post  BubbleYum Fri Jun 20, 2008 8:23 am

You can also add,


if (t.Humanoid ~= nil) then


To check it's a player, am I wrong? I'm trying to figure out hopperbins and this little lesson really helped.
BubbleYum
BubbleYum
Moderate Poster
Moderate Poster

Posts : 149
Join date : 2008-06-19
Age : 115
Location : In ur kitchen, eatin ur cookiez!

http://robloxpenguin.weebly.com

Back to top Go down

Lesson: Hopperbins Empty Re: Lesson: Hopperbins

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum