generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help! Script Problem!

Previous Thread :: Next Thread 
Taylod is not online. 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 is not online. 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
Jayskull900 is not online. Jayskull900
Joined: 26 Nov 2006
Total Posts: 590
18 Aug 2012 07:06 PM
Where is your function?
Report Abuse
Taylod is not online. Taylod
Joined: 03 Jun 2011
Total Posts: 272
18 Aug 2012 07:07 PM
Oh yeah. XD
Report Abuse
Jayskull900 is not online. Jayskull900
Joined: 26 Nov 2006
Total Posts: 590
18 Aug 2012 07:08 PM
Re-Post if you're still having issues.
Report Abuse
Taylod is not online. 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
Jayskull900 is not online. Jayskull900
Joined: 26 Nov 2006
Total Posts: 590
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 is not online. Taylod
Joined: 03 Jun 2011
Total Posts: 272
18 Aug 2012 07:17 PM
Yes.
Report Abuse
Taylod is not online. 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
Jayskull900 is not online. Jayskull900
Joined: 26 Nov 2006
Total Posts: 590
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 is not online. 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 is not online. 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
Jayskull900 is not online. Jayskull900
Joined: 26 Nov 2006
Total Posts: 590
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
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image