cj0707
|
  |
| Joined: 06 Oct 2009 |
| Total Posts: 196 |
|
|
| 01 Mar 2012 10:56 AM |
I am using andymewborns tycoon kit and i putting in a tycoon owner only door but as i build it i have to keep the owner only door behind the "Become Owner" door where can i pat the new location sentence in this script please help???
local tycoon = script.Parent.Parent.Parent local owner = tycoon.Owner local debounce = false local cost = 50 -- change 50 to the price you want the upgrade to cost local upgrade = tycoon:findFirstChild("door") -- put the EXACT name of the upgrade local newUpgrade = upgrade:Clone() wait(.1) upgrade:Remove()
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil and debounce == false then local alert = player.PlayerGui.TycoonGui.Alert debounce = true if owner.Value ~= player.Name then alert.Text = "You are not the owner of this Base!" -- you can change "tycoon" to whatever you want alert.Type.Value = "Alert" -- don't mess with this alert.On.Value = true wait(2) -- you can change the wait time to allow to be touched again debounce = false return end if player.leaderstats.Money.Value < cost then local mn = cost-player.leaderstats.Money.Value alert.Text = "Not enough money! You need $" ..mn.. " more!" alert.Type.Value = "Alert" alert.On.Value = true wait(2) -- you can change the wait time to allow to be touched again debounce = false return end player.leaderstats.Money.Value = player.leaderstats.Money.Value - cost newUpgrade.Parent = tycoon alert.Text = "Upgrade complete!" -- you can change what it says here. For an example, you're buying a chair. Chair bought! alert.Type.Value = "Message" -- don't mess with this alert.On.Value = true for i = 0.4, 1, 0.01 do wait() script.Parent.Transparency = i end script.Parent.Parent:Remove() end wait(2) -- you can change the wait time to allow to be touched again debounce = false end)
also would i put qoutation marks around the position numbers? |
|
|
| Report Abuse |
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
cj0707
|
  |
| Joined: 06 Oct 2009 |
| Total Posts: 196 |
|
|
| 01 Mar 2012 11:10 AM |
| if your just going to say that dont post on here at all |
|
|
| Report Abuse |
|