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
 

Tycoon Owner only door position help??? please read.

Previous Thread :: Next Thread 
cj0707 is not online. 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 is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
01 Mar 2012 11:04 AM
[ Content Deleted ]
Report Abuse
cj0707 is not online. 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
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