Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
|
| 18 Aug 2012 07:05 PM |
This is a repost, so please help. :)
There's a problem with the script, and I can't seem to find what. I believe it has something to do with how I've set the script out.
What I'm trying to do is make it so when a player spawns, they cannot move and a GUI comes up saying "Ready? 3, 2, 1, FIGHT!" And just after the'Fight!' command, it makes their Walkspeed 16 again.
Script:
Player.Humanoid.Walkspeed = 0 script.Parent.Text = "Ready?" wait(0.6) script.Parent.Text = "3" wait(0.6) script.Parent.Text = "2" wait(0.6) scrpit.Parent.Text = "1" wait(0.6) script.Parent.Text = "Fight!" Player.Walkspeed = 16 wait(0.375) script.Parent.Visible = false end end
|
|
|
| Report Abuse |
|
|
Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
|
| 18 Aug 2012 07:06 PM |
| Don't tell me script is spelt wrong. I know. |
|
|
| Report Abuse |
|
|
| |
|
Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
| |
|
|
| 18 Aug 2012 07:08 PM |
| Re-Post if you're still having issues. |
|
|
| Report Abuse |
|
|
Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
|
| 18 Aug 2012 07:12 PM |
This will probably make me sound like an idiot, but...
What function should I use? |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 07:16 PM |
| You can use PlayerEntered if this is a kinda start issue. Is this supposed to show every time they respawn? |
|
|
| Report Abuse |
|
|
Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
| |
|
Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
|
| 18 Aug 2012 07:18 PM |
| And that's gonna stuff up the PlayerEntered function, isn't it... |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 07:20 PM |
Then put the script in the StarterPack.
pn = script.Parent.Parent.Name while true do h = Workspace.pn:FindFirstChild("Humanoid") wait(3) if not n then return end if h.Health is < 1 then -- Code -- This is not the only way but itll work. |
|
|
| Report Abuse |
|
|
Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
|
| 18 Aug 2012 07:22 PM |
OK. I'll try it. Thanks. :)
Wait - so I just put my script where it says "--Code" right? |
|
|
| Report Abuse |
|
|
Taylod
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 272 |
|
|
| 18 Aug 2012 07:23 PM |
| So I put the GUI (the script's Parent) in the StarterPack too? |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 07:27 PM |
| Not the GUI. Keep that where it is, just make sure your script can find it. And yes. Make sure you add an end for the while loop. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 07:32 PM |
function Respawn(p,c) repeat wait() until c.Humanoid c.Humanoid.WalkSpeed = 0 local msg = Instance.new("Message",p.PlayerGui) msg.Text = "Ready?" wait(.5) for i = 3, 3, -1 do wait(1) msg.Text = tostring(i).."..." end msg.Text = "Fight!" c.Humanoid.WalkSpeed = 16 end
Game:GetService("Players").ChildAdded:connect(function(Player) repeat wait() until Player.Character Player.CharacterAdded:connect(function(Character) Respawn(Player,Character) end) end)
|
|
|
| Report Abuse |
|
|