|
| 04 May 2013 07:48 PM |
function Click() wait() local Action = Workspace.HeadTurn local ActionClone = Workspace.HeadTurn:Clone() Clicker = script.Parent.Parent.Parent.Parent.Parent.Parent.Name ActionClone.Parent = Workspace.Clicker ActionClone.Disabled = false ActionClone:Destroy() end
script.Parent.MouseButton1Down:connect(Click)
The output says that Clicker is not a valid member of Workspace. So I guess variables don't work when just plainly Workspace.Clicker. Is there something I'd need to add so that the Name is what they read? |
|
|
| Report Abuse |
|
|
|
| 04 May 2013 07:53 PM |
| Change name to clicker in properties. |
|
|
| Report Abuse |
|
|
|
| 04 May 2013 08:01 PM |
| Variables aren't stored in the workspace. |
|
|
| Report Abuse |
|
|
|
| 04 May 2013 08:22 PM |
| script.Parent.Parent.Parent.Parent.Parent.Parent.Name = Clicker |
|
|
| Report Abuse |
|
|
|
| 04 May 2013 08:25 PM |
| ActionClone.Parent = Workspace:FindFirstChild(Clicker) |
|
|
| Report Abuse |
|
|
|
| 04 May 2013 08:52 PM |
Thanks to whoever tried to help.
function Click() print('Clicked') wait() local Action = Workspace.HeadTurn local ActionClone = Action:Clone() Clicker = script.Parent.Parent.Parent.Parent.Parent.Parent.Name ActionClone.Parent = Workspace:FindFirstChild(Clicker) print('ParentChanged') ActionClone.Disabled = false ActionClone:Destroy() print('End') end
script.Parent.MouseButton1Down:connect(Click)
It still won't work even though the output says:
Clicked ParentChanged End
Anyone else have anything? |
|
|
| Report Abuse |
|
|
|
| 04 May 2013 10:05 PM |
Will anyone please help? D:
I'm basically asking this:
How do I insert something into the player's model who clicked on the GUI button?
Workspace >Player1
Players >Player1 >PlayerGui >ScreenGui >Thing >OtherThing >Action >Script
|
|
|
| Report Abuse |
|
|