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: Working script that works in the wrong way

Previous Thread :: Next Thread 
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
14 Nov 2011 11:25 AM
I made this script for a pirate RP where you have to have a certain amount of money to own the house(tycoon) and if you don't have enough you can't own it.
It works but even if you own a house when you touch the door of another tycoon it takes the money from you but you don't own it. It shouldn't do this but why is it, Do i need to add something?

local ting = 0
owner = script.Parent.Parent.Parent.OwnerName
function onTouched(hit)
if hit.Parent.Humanoid~= nil then
cash = game.Players:findFirstChild(hit.Parent.Name).leaderstats.Treasure
if cash.Value >= 50 and ting == 0 then
cash.Value = cash.Value - 50
ting = 1
check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
if (user:FindFirstChild("rig") ~= nil) then
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
local message = Instance.new("Message")
message.Text = "You already own a House"
message.Parent = user
wait(3)
message:remove()
else
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
owner.Value = hit.Parent.Name
local own = Instance.new("IntValue")
own.Name = "rig"
own.Parent = user
local message = Instance.new("Message")
message.Text = "You now own this House"
message.Parent = user
wait(3)
message:remove()
script.Parent.Parent:remove()
end
end
ting = 0
end
end
end
script.Parent.Touched:connect(onTouched)
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
14 Nov 2011 11:31 AM
Is this too complex for you guys?

I'll figure this out myself eventualy, If you do know whats wrong just put it here please.

-M.298-
Report Abuse
Lightmaster9 is not online. Lightmaster9
Joined: 14 May 2009
Total Posts: 8659
14 Nov 2011 11:38 AM
Looks like a free modeled tycoon button.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
14 Nov 2011 11:47 AM
Free modeled tycoon button. How dare you. This is a Tycoon owner door script made by me where you have to have money to buy a tycoon or in this case house and if you do not have enough you cannot own it. Like you could find it in free models.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
14 Nov 2011 11:49 AM
And i fixed it, There was a bit or an error with the placement of the payment method which i have now corrected.
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
14 Nov 2011 11:59 AM
Yeah, free model tycoon script.

By the way I'm not helping you because of the way you treat people who need help. E.G-Combrad
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
14 Nov 2011 12:47 PM
And the way to you sayed against us :
Is this too complex for your guys.
Then I say :
How dare you to say that against a Nice human that wish to help people with Scripting in Rbx.Lua.

Juriaan
~ Scripting is for Wise Users ~

P.S Welcome back Soulstealer
Report Abuse
SoulStealer9875 is not online. SoulStealer9875
Joined: 20 Jul 2009
Total Posts: 13119
14 Nov 2011 02:00 PM
@juriaan, thanks. I'm not on that often though
Report Abuse
Nikolas5411 is not online. Nikolas5411
Joined: 03 Apr 2010
Total Posts: 2117
14 Nov 2011 03:06 PM
Looks like that Walmart tycoon button. XD
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