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
 

Script not working

Previous Thread :: Next Thread 
Nhelp is not online. Nhelp
Joined: 05 Aug 2011
Total Posts: 11557
27 Dec 2013 03:48 AM
script.Parent.Touched:connect(function(part)
if script.Parent.Value == false then
script.Parent.Value = true
for i,v in part.Parent:getChildren() do
if v.ClassName == Part then
v.Anchored = true
else wait()
end
end
m = Instance.new("Message", workspace)
m.Text = "You: Where am I?"
wait(3)
m.Text = "You: What is this place?"
wait(5)
m:Destroy()
for i,v in part.Parent:getChildren() do
if v.ClassName == Part then
v.Anchored = false
else wait()
end
end
script.Parent.Value = false
end
end
)

So basically it's supposed to freeze the character of the player who touches it and make that message appear, then thaw the character.

Output doesn't give me any error, the script doesn't have anything underlined in red.
When I play normally, it won't do anything.

Report Abuse
cart6157 is not online. cart6157
Joined: 28 Feb 2009
Total Posts: 2194
27 Dec 2013 03:51 AM
if v.ClassName == "Part" then

A classname is always a string, also you could just anchor the torso make the player's walk speed 0.
Report Abuse
Robloxmaster2137 is not online. Robloxmaster2137
Joined: 30 Jan 2011
Total Posts: 281
27 Dec 2013 04:38 AM
or you could do...
if v:IsA("Part") then
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