Shockfi
|
  |
| Joined: 22 May 2012 |
| Total Posts: 120 |
|
|
| 23 May 2012 02:01 PM |
Nothing happens when I test, In output all it said was : 16:26:19 - Coin is not a valid member of Part
Here's the coin script just incase it might have to do something with it: new = script.Parent:clone()
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid") if (h~=nil) then local thisplr = game.Players:findFirstChild(h.Parent.Name) if (thisplr~=nil) then local stats = thisplr:findFirstChild("leaderstats") if (stats~=nil) then local score = stats:findFirstChild("Block_Tokens") if (score~=nil) then wait() thisplr.PlayerGui.WarningGUI.Message.Visible = true script.Parent:destroy() score.Value = score.Value + 1
local playr2 = part.Parent:findFirstChild("Torso") playr2.CFrame = CFrame.new(game.Workspace.Checkpoints.Checkpoint3.Position) -- Don't forget to change this. wait(4) new.Parent = game.Workspace thisplr.PlayerGui.WarningGUI.Message.Visible = false
if score.Value == 1 then thisplr.PlayerGui.ReturnGUI.Message.Visible = true script.Disabled = true playr2.CFrame = CFrame.new(game.Workspace.Checkpoints.Checkpoint3.Position) -- and this thisplr.PlayerGui.ReturnGUI.Message.Visible = false
end end end end end end
script.Parent.Touched:connect(onTouched)
Here's the undisable script: while true do if game.Workspace.Part.Coin.Disabled = true then wait(2) game.Workspace.Part.Coin.Disabled = false end end
|
|
|
| Report Abuse |
|
|
|
| 23 May 2012 02:30 PM |
| This won't work if there are multiple "Part"s in your game. It means the Part it's looking in doesn't have "Coin". |
|
|
| Report Abuse |
|
|
|
| 23 May 2012 06:09 PM |
Your undisable script will crash the game. At least add a wait(0) after the while true do It's weird, I know. |
|
|
| Report Abuse |
|
|
|
| 23 May 2012 06:16 PM |
Try this undisabling script:
while true do wait(0) a = Workspace:GetChildren() for i = 1, #a do if a[i].Name == "Part" then if a[i]:FindFirstChild("Coin") ~= nil then if a[i].Coin.Disabled == true then a[i].Coin.Disabled = false end end end end end |
|
|
| Report Abuse |
|
|