|
| 08 Jul 2015 07:41 PM |
| Ok, I have local scripts that are in the StarterGui and that require the map in the workspace in order to function. The script works fine, except for the fact that the part where I need to connect it fails. I get this error because map needs to be in the workspace so that I won't get that error. I don't have the map in workspace because it needs to be refreshed everytime players play it and I can not change it into a server script because it won't work the way I want it to. Do you guys have any idea as to how I should solve this error? |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:46 PM |
Can you show me the code?
SIKE |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:50 PM |
local Debounce = false function onTouched(hit) if Debounce == false then Debounce = true local R = hit.Parent:findFirstChild("Robot") for i, Player in pairs(game.Players:GetPlayers()) do if R ~= nil then wait(10) game.Workspace.Dialogue:Clone().Parent = Player.PlayerGui game.Workspace.Nuclear:Clone().Parent = Player.PlayerGui wait(4) game.Workspace.ChapOne.MutantMayhem.Commence.Start.Alarm.Bulb.Crumble:Play() wait(8) Player.Character:MoveTo(Vector3.new(-560.17, 806.2, -208.6)) for i = 1, 10 do wait(.1) Player.PlayerGui.Nuclear.White.BackgroundTransparency = Player.PlayerGui.Nuclear.White.BackgroundTransparency + .1 end wait(1.5) for i = 1, 10 do wait(.1) Player.PlayerGui.Nuclear.Black.BackgroundTransparency = Player.PlayerGui.Nuclear.Black.BackgroundTransparency + .1 end game.Workspace.ChapOne.MutantMayhem.Commence.Start.Alarm.Bulb.Electrical:Play() Debounce = false end end end game.Workspace.ChapOne.MutantMayhem.Touched:connect(onTouched) -- ChapOne = nil |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 07:59 PM |
| Bump...is there some method I can use in order to stop the script from actually checking to see if the connection line checking to see if the model in workspace exists? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 09 Jul 2015 09:40 AM |
Well you could to something to check if the map is in workspace, which I am guessing is what you want to do... you could do if MapName ~=nil then
SIKE |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 12:58 PM |
| Oh thanks! :D I combined it with the repeat until method and now it works great! :D Thanks m8 |
|
|
| Report Abuse |
|
|
| |
|