of     2   
chevron_rightchevron_rightchevron_right

bladeclone
#143766797Saturday, August 16, 2014 6:51 PM GMT

You touch the button and the model 'Pickup' is supposed to regenerate if you own the tycoon it is a part of, however, this does not work at all. button = script.Parent regen = button.Parent.Regen tycoon = script.Parent.Parent.Parent local debounce = false script.Parent.Head.Touched:connect(function(h) local player = game.Players:GetPlayerFromCharacter(h.Parent) if not (player) then return end if (active) then return end debounce = true if (tycoon.Owner.Value ~= player) then msg("This is not your " .. tycoon.Parent.NameOfTycoon.Value .. "!","Message",3,player) debounce = false return end if h ~= nil and debounce == false then debounce = true button.BrickColor = BrickColor.Black() regen.Value = 1 wait() regen.Value = 0 wait(5) button.BrickColor = BrickColor.new(104) debounce = false end end button.Touched:connect(onTouch)
bladeclone
#143775261Saturday, August 16, 2014 8:33 PM GMT

Bump
bladeclone
#143780243Saturday, August 16, 2014 9:30 PM GMT

Bump
bladeclone
#143789339Saturday, August 16, 2014 11:23 PM GMT

Bump
mamba_mentality
#143790145Saturday, August 16, 2014 11:32 PM GMT

this isn't a regen script it finds the player then if he isnt owner of the tycoon it gives him a message then it sets the value of "regen" where is the regen part
bladeclone
#143790461Saturday, August 16, 2014 11:36 PM GMT

This activates the regen script. The regen script works fine, this is where the problem lies, it's not activating regen script.
mamba_mentality
#143790639Saturday, August 16, 2014 11:39 PM GMT

is regen a stringvalue?
bladeclone
#143791858Saturday, August 16, 2014 11:56 PM GMT

intvalue. when it's 1 the model regens
mamba_mentality
#143792643Sunday, August 17, 2014 12:05 AM GMT

well then maybe its the part of the regen script that regens when the value is 1
mamba_mentality
#143792868Sunday, August 17, 2014 12:08 AM GMT

local regen = ______ while true do if regen.Value =~ 0 then BLAH BLAH BLAH wait() end
script_frog
#143792869Sunday, August 17, 2014 12:08 AM GMT

To regen a model you have to create a backup copy of it using :copy() to have a backup before it was moved somewhere else. Then, once you're ready for it, just give the copy a parent, then make a new copy. For example: c = regen:copy() wait(5) c.Parent = game.Workspace c = c:copy() Something like that.
mamba_mentality
#143792956Sunday, August 17, 2014 12:09 AM GMT

^ he already said when regen value is 1 the regen activates
bladeclone
#143842254Sunday, August 17, 2014 4:20 PM GMT

No, I'm quite sure the rest of the script is quite fine as it works perfectly before I added in the tycoon owner part, that seems to break it but I'm not sure why.
bladeclone
#143858565Sunday, August 17, 2014 7:55 PM GMT

Bump
bladeclone
#143867246Sunday, August 17, 2014 9:46 PM GMT

Bump
bladeclone
#143921110Monday, August 18, 2014 2:51 PM GMT

Bump
bladeclone
#143927751Monday, August 18, 2014 4:49 PM GMT

Bump
blooo127127
#143928354Monday, August 18, 2014 5:00 PM GMT

Change regen to a bool value. Change the value to true when you want to regenerating and have the regeneration script do w/e then change the value to false, not the owner script. -- regen script regen = script.Regen regen.Changed:connect(function() if not regen.Value then return end --do stuff regen.Value = false end)
bladeclone
#144001181Tuesday, August 19, 2014 2:40 PM GMT

Well, as I said, the script works fine without the tycoonowner part, are you sure this will fix the problem?
bladeclone
#144423018Sunday, August 24, 2014 7:42 PM GMT

bump
bladeclone
#144427485Sunday, August 24, 2014 8:34 PM GMT

Bump.
bladeclone
#144435767Sunday, August 24, 2014 10:09 PM GMT

Bump.
bladeclone
#144482754Monday, August 25, 2014 2:16 PM GMT

Bump.
bladeclone
#144491605Monday, August 25, 2014 5:24 PM GMT

Bump
bladeclone
#145262527Wednesday, September 03, 2014 8:35 PM GMT

Bump.

    of     2   
chevron_rightchevron_rightchevron_right