|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 28 Mar 2017 10:15 PM |
| Just replace it with what PhantomVisual posted |
|
|
| Report Abuse |
|
|