Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Script still not working?

  ----game.StarterGui.MaskGUI.Visor.Visible -----
 wait(10)
 if game.StarterGui.MaskGUI.Visor.Visible == true then
 game.Workspace.EnemyTest.Vector3.new(13, 0.5, 49.6)
  else
  print("Does it work?") 
  p = game.Players:GetChildren()
 for i = 1,#p do
 p[i].Character.Head:Destroy() 
end
end

What this script is supposed to do is if the mask image label is visible after 10 seconds, then it will move the enemy away, if not, then every player will die. However, each time I test this, I die everytime, even with the mask on.

This is the output:

IsFirstUse = false false UseOldUI = nil nil 14:30:49.930 - An error occurred 14:30:49.931 - Script 'Plugin_142430458.Multiplayer Studio.Script', Line 42 14:30:49.932 - Stack End Loading Cutscene Editor... 14:30:51.006 - Unable to create an Instance of type "StockSound" 14:30:51.007 - Script 'Plugin_142296237.CutsceneEdit.Plugin', Line 58 - global addSound 14:30:51.008 - Script 'Plugin_142296237.CutsceneEdit.Plugin', Line 65 14:30:51.008 - Stack End Does it work?

2 comments

0

The error is clearly referencing a Studio plugin, and not your script . .

0

BlueTalslem, did you read the last part that says "Does it work?" It's basically saying that it is going through the killing part of the script.

2 answers

I am not sure, but I think the problem is that it is checking inside the StarterGui, not in YOUR Gui. So it doesn't matter if you are wearing it or not. If it isn't visible in the StarterGui, you will always die.

If I am correct, then the enemy should back away if you turn it Visible inside the StarterGui, even with the mask off.

Tell me if I was correct, or if it is already Visible inside the StarterGui.

I'm not sure entirely what you are attempting to do, but I assume that you are attempting to change the position of EnemyTest. In which case, you would use the "MoveTo" method, as follows.

game.Workspace.EnemyTest:MoveTo(Vector3.new(13, 0.5, 49.6))

Please remember to vote as an act of kindness. It does help.

This discussion is preserved as it was. New answers, comments, and votes are closed.