Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Script still not working? [closed]

Asked by 10 years ago

This question already has an answer here:

Is this script correct, if not, how do I fix it?
  ----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?

0
The error is clearly referencing a Studio plugin, and not your script . . BlueTaslem 18071 — 10y
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. Scubadoo2 115 — 10y

Marked as Duplicate by TheeDeathCaster, Tkdriverx, samfun123, and EzraNehemiah_TF2

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

2 answers

Log in to vote
1
Answered by
Scubadoo2 115
10 years ago

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.

Ad
Log in to vote
1
Answered by
DeadToMe 105
10 years ago

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.