|
| 19 Aug 2011 02:55 PM |
| i need help making e enouga script that only allows people through the door is they havh cash got any ideas. |
|
|
| Report Abuse |
|
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
| |
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
| |
|
|
| 19 Aug 2011 03:19 PM |
| like they need an amount of cash to go in? |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 03:43 PM |
function t(h) if h.Parent.WhatEverTheMoneySystemIsGoesHere >= NumberGoesHere then script.Parent.CanCollide = false script.Parent.Transparency = 1 wait(2) script.Parent.CanCollide = true script.Parent.Transparency = 0 end end script.Parent.Touched:connect(t)
|
|
|
| Report Abuse |
|
|
|
| 19 Aug 2011 03:47 PM |
@josh
Nope. Won't work.
~~ In Soviet Russia, scripts write you. ~~ |
|
|
| Report Abuse |
|
|
Wargod99
|
  |
| Joined: 11 Apr 2008 |
| Total Posts: 548 |
|
|
| 19 Aug 2011 04:16 PM |
local _Button = script.Parent local ting = 0 function onTouched(hit) local user = game.Players:GetPlayerFromCharacter(hit.Parent) if (user ~= nil) then local stats = user:findFirstChild("leaderstats") if stats ~= nil then local cash = stats:findFirstChild("Money") if cash.Value >= 5000 then --5000 in money required if ting == 0 then ting = 1 _Button.CanCollide = false _Button.Transparency = 0.5 wait(2) _Button.CanCollide = true _Button.Transparency = 0 ting = 0 end else hit.Parent.Humanoid.Health = 0 --Stops people without enough money walking through when a valid user opens it ontouch end end end end _Button.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2011 02:29 PM |
| yea i need that one you said its good but does it go into the door or into the cash or into what?? |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2011 02:34 PM |
| well i think youd put the script for the door IN the door... i mean it sounds roodamentary to me. |
|
|
| Report Abuse |
|
|