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
|
  |
| 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 |
|
|
|
| 14 Nov 2011 11:38 AM |
| Looks like a free modeled tycoon button. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 14 Nov 2011 02:00 PM |
| @juriaan, thanks. I'm not on that often though |
|
|
| Report Abuse |
|
|
|
| 14 Nov 2011 03:06 PM |
| Looks like that Walmart tycoon button. XD |
|
|
| Report Abuse |
|
|