icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
|
| 17 Jul 2012 10:05 AM |
I have a tycoon door where when you touch it, it dissapears and says your name as the owner.
function OnTouch(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then script.Parent.Parent.Name = ..owner.." Owns the Apartments!" script.Parent:Remove() end end
script.Parent.Touched:connect(OnTouch)
10:01:28 - Workspace.Buy Frame: 1000 Cash.Head.Script:4: 'then' expected near '=' 10:01:29 - Workspace.No One Owns The Apartments!.Part.Script:5: unexpected symbol near '..' 10:01:29 - Owner is not a valid member of Model 10:01:29 - Script "Workspace.No One Owns The Apartments!.Regenerator", Line 15 10:01:29 - stack end
This was output, and I don't see anything wrong with the selected spots. (Ignore the parts about the regener, I fixed that.) |
|
|
| Report Abuse |
|
|
Techwiz19
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 462 |
|
|
| 17 Jul 2012 10:07 AM |
| script.Parent.Parent.Name = owner.." Owns the Apartments!" |
|
|
| Report Abuse |
|
|
icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
| |
|
icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
|
| 17 Jul 2012 10:14 AM |
Ok this is what i have now, but it is not working in test mode. print 'Hello world!' local owner = script.Parent.Parent.Owner function OnTouch(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then owner.Value = hit.Parent.Name script.Parent.Parent.Name = owner.." Owns the Apartments!" script.Parent:Remove() end end
script.Parent.Touched:connect(OnTouch)
And the dreaded output says: 10:12:38 - Workspace.No One Owns The Apartments!.Part.Script:6: attempt to concatenate upvalue 'owner' (a userdata value) 10:12:38 - Script "Workspace.No One Owns The Apartments!.Part.Script", Line 6 10:12:38 - stack end 10:12:38 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
icanxlr8
|
  |
| Joined: 25 Feb 2009 |
| Total Posts: 3686 |
|
| |
|
Techwiz19
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 462 |
|
|
| 18 Jul 2012 04:07 PM |
| script.Parent.Parent.Name = owner.Value.." Owns the Apartments!" |
|
|
| Report Abuse |
|
|