of     1   

Madified
#186281803Tuesday, March 29, 2016 12:10 AM GMT

So in some games when you mouse over a part or a tool, you can press E to pick it up. How would I make a gui pop up when you mouseover a tool/part and how would you make it so when you press E while also mouse overd to pick it up and put it in the backpack. Wiki Links are appreciated as I'm sure this is extremely simple I just haven't done it before.
Luo_Basics
#186282070Tuesday, March 29, 2016 12:13 AM GMT

"10 points for best answer" wtf is this yahoo answers? y-you monster
Madified
#186282184Tuesday, March 29, 2016 12:14 AM GMT

No this is not yahoo answers. Please don't ask questions that you know the answer to
Luo_Basics
#186282258Tuesday, March 29, 2016 12:15 AM GMT

"Please don't ask questions that you know the answer to" then dont ask how to do what you asked for. y-you monster
Kryddan
#186282626Tuesday, March 29, 2016 12:19 AM GMT

local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:wait() local mouse = player:GetMouse() local pickup = false local gui = gui --change to the location of the gui local uis = game:GetService("UserInputService") local distance = 20 -- change this to how close the part has to be so you can pick it up. mouse.Move:connect(function() if mouse.Target.Name == "part or tool name" and (mouse.Target.Position - character.Torso.Position).magnitude <= distance then pickup = true gui.Visible = true uis.InputBegan:connect(function(input) if input.KeyCode == Enum.KeyCode.E and pickup == true then mouse.Target:Clone().Parent = player.Backpack mouse.Target:Destroy() gui.Visible = false end end) else pickup = false gui.Visible = false end end)
Madified
#186282985Tuesday, March 29, 2016 12:24 AM GMT

@iJacob, I was kiiidddinnng, we're all friends here. And thanks for the help everyone
Kryddan
#186283383Tuesday, March 29, 2016 12:28 AM GMT

"thanks for the help everyone" I was everyone but aight :P
Madified
#186283725Tuesday, March 29, 2016 12:32 AM GMT

I couldn't remember you're name :P sorry man. Special thanks to the dude with the K in his name ;)
Luo_Basics
#186283766Tuesday, March 29, 2016 12:33 AM GMT

yeah, thanks to that mad guy y-you monster
Madified
#186284477Tuesday, March 29, 2016 12:41 AM GMT

Alright guys we need solutions mouse.Target:Destroy() that is destroying everything that is under the tool too not just the tool.
Kryddan
#186284699Tuesday, March 29, 2016 12:44 AM GMT

local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:wait() local mouse = player:GetMouse() local pickup = false local gui = gui --change to the location of the gui local uis = game:GetService("UserInputService") local distance = 20 -- change this to how close the part has to be so you can pick it up. local tool mouse.Move:connect(function() if mouse.Target.Name == "part or tool name" and (mouse.Target.Position - character.Torso.Position).magnitude <= distance then pickup = true gui.Visible = true uis.InputBegan:connect(function(input) if input.KeyCode == Enum.KeyCode.E and pickup == true then tool = mouse.Target tool:Clone().Parent = player.Backpack tool:Destroy() tool = nil pickup = false gui.Visible = false end end) else pickup = false gui.Visible = false end end)
PureConcept
#186284976Tuesday, March 29, 2016 12:47 AM GMT

Kry you didn't need to do that "Alright guys we need solutions" Learn 2 script best answer http://www.roblox.com/unnamed-item?id=385096183 Ready to waste a ton of money of VR tech for Sword Art Online : The Beginning
Madified
#186285025Tuesday, March 29, 2016 12:47 AM GMT

Haha that would do the same thing, I fixed it using :IsA to check if it was a tool before it removed it. Thanks again Everyone
Madified
#186285092Tuesday, March 29, 2016 12:48 AM GMT

c9_io is right guys, I need to learn to script. I first need to develop a basic knowledge of rbx.lua before you start tossing me scripts.
Kryddan
#186285337Tuesday, March 29, 2016 12:51 AM GMT

@c9 what are you talking about?? my script works fine without my miss of a if statement. I made a small misstake sorry king
PureConcept
#186285393Tuesday, March 29, 2016 12:51 AM GMT

No it's fine what you did just that there was a simpler answer http://www.roblox.com/unnamed-item?id=385096183 Ready to waste a ton of money of VR tech for Sword Art Online : The Beginning
Madified
#186285462Tuesday, March 29, 2016 12:52 AM GMT

@Kry, I think he was talking about me learning to script instead of you scripting for me. Even though he obviously doesn't come here very often to know that I am always helping people with their scripts.
Kryddan
#186285574Tuesday, March 29, 2016 12:54 AM GMT

ofc there is, I know of a much simpler and more effiecent way but I wrote it like this to get more attention towards less advanced scripters, who probably wouldn't understand the more compley but simpler way. @mad I am not speaking about you, just so you know

    of     1