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 » Scripting Helpers
Home Search
 

Re: Tycoon Door Help

Previous Thread :: Next Thread 
icanxlr8 is not online. 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 is not online. 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 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
17 Jul 2012 10:08 AM
thx
Report Abuse
icanxlr8 is not online. 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 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
18 Jul 2012 04:02 PM
Bump
Report Abuse
Techwiz19 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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