generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: I need help with this coffee cup! please

Previous Thread :: Next Thread 
Ayee_Melanie4Life is not online. Ayee_Melanie4Life
Joined: 29 Jul 2015
Total Posts: 22
28 Mar 2017 12:02 AM
I have a cafe on roblox but when I click the cup it dosnt give it to me but here is the script
I have the click detonate, And the mesh for the cup but everytime when I click it it says coffee cup is not a valid member in lighting And I am so confused what to do I need help PLS!

-- Forkd --
-----

function a(x)
local y = game.Lighting.CoffeeCup:Clone()
y.Parent = x.Backpack
end

script.Parent.ClickDetector.MouseClick:connect(a)



Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
28 Mar 2017 12:06 AM
Try adding :WaitForChild() for the CoffeeCup.

script.Parent.ClickDetector.MouseClick(function(x)
game.Lighting:WaitForChild("CoffeeCup"):Clone().Parent = x.Backpack
end)


Report Abuse
Ayee_Melanie4Life is not online. Ayee_Melanie4Life
Joined: 29 Jul 2015
Total Posts: 22
28 Mar 2017 01:17 PM
Okay.
Report Abuse
Ayee_Melanie4Life is not online. Ayee_Melanie4Life
Joined: 29 Jul 2015
Total Posts: 22
28 Mar 2017 09:34 PM
Can you put it in a specific way like pretend like you were doing the script dont add Try adding.


Report Abuse
Ayee_Melanie4Life is not online. Ayee_Melanie4Life
Joined: 29 Jul 2015
Total Posts: 22
28 Mar 2017 09:50 PM
Do I need to add it on the same script or delete the script and add the one you told me?


Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
28 Mar 2017 10:15 PM
Just replace it with what PhantomVisual posted
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image