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: Tree morph script not working

Previous Thread :: Next Thread 
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 07:58 PM
When I enter the game and say tree, it spawns correctly, but I don't get the ability to move the tree. My character destroys itself, but the tree stays and doesn't become my character. Please help!

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
character = player.Character
if msg:lower():sub(1,4) == "tree" then
tree = game.Lighting.Tree:clone()
tree.Parent = Workspace
tree:MakeJoints()
repeat wait() until Workspace.Tree
player.Character.Parent = Workspace.Tree
end
end)
end)

~repeat wait() until script.Parent:HasALife()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 08:00 PM
help!

~repeat wait() until script.Parent:HasALife()
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
24 Aug 2012 08:00 PM
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
character = player.Character
if msg:lower():sub(1,4) == "tree" then
tree = game.Lighting.Tree:clone()
tree.Parent = Workspace
tree:MakeJoints()
repeat wait() until Workspace.Tree
player.Character= Workspace.Tree
end
end)
end)
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 08:04 PM
Why'd you define character for no reason?

~repeat wait() until script.Parent:HasALife()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 08:16 PM
bump

~repeat wait() until script.Parent:HasALife()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 08:43 PM
b u m p

~repeat wait() until script.Parent:HasALife()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 09:07 PM
hgvhjghjbhjhjjhhjhjjh

~repeat wait() until script.Parent:HasALife()
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
24 Aug 2012 09:20 PM
@Your sig,
You probably meant:
repeat wait() until script.Parent.HasALife == true
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 09:26 PM
It's a joke.

~repeat wait() until script.Parent:HasALife()
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
24 Aug 2012 09:30 PM
@The,
I understand, but you cannot use the context HasALife for a method.
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 09:49 PM
I didn't even know it existed.

~repeat wait() until script.Parent:HasALife()
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
24 Aug 2012 09:50 PM
@The,
WDF?
it doesnt...
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 09:59 PM
"I understand, but you cannot use the context HasALife for a method."

I though you meant it existed LOL.

~repeat wait() until script.Parent:HasALife()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 09:59 PM
But, yeah; any help here?

~repeat wait() until script.Parent:HasALife()
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
24 Aug 2012 10:00 PM
@thedeath
Yea,
I use it on normal basis,
if part:HasALife(Middle aged) then
print("LIFEEEE")
end
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 10:01 PM
Ok, I get it. Could you help me?

~repeat wait() until script.Parent:HasALife()
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
24 Aug 2012 10:09 PM
script.Parent.LifeAdded:wait()

i just did what your signature did, but via C-side

anyway you should probably take a look at the output.

¬ SHG Scripter Tier-2, LuaLearners Elite - pm me!
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 10:21 PM
It doesn't give me anything.

~repeat wait() until script.Parent:HasALife()
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
24 Aug 2012 10:22 PM
you ought to add some print()'s to your script so you know where it gets stuck. my best bet is that it gets stuck at the loop.

¬ SHG Scripter Tier-2, LuaLearners Elite - pm me!
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 10:26 PM
ok, lemme do so.

~repeat wait() until script.Parent:HasALife()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 10:29 PM
It passes everything.

~repeat wait() until script.Parent:HasALife()
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
24 Aug 2012 10:30 PM
oh!! how did i not see that.

well, you set the character's parent, instead of just the character.

try player.Character = Workspace.Tree

¬ SHG Scripter Tier-2, LuaLearners Elite - pm me!
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Aug 2012 10:32 PM
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
character = player.Character
if msg:lower():sub(1,4) == "tree" then
tree = game.Lighting.Tree:clone()
tree.Parent = Workspace
tree:MakeJoints()
repeat wait() until Workspace:FindFirstChild("Tree")
player.Character.Parent = Workspace.Tree
end
end)
end)

Try that.

Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 10:33 PM
Nope; that spawns the tree and deletes my character, leaving a control-less tree and me without a character to move around. In the tree model is two parts, the ball (leaves) and the log (a long, tall part).

~repeat wait() until script.Parent:HasALife()
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
24 Aug 2012 10:35 PM
@miz, your script spawns the tree, but keeps my character. So I can't control the tree, I'm still controlling my character. Just like the first script does.

~repeat wait() until script.Parent:HasALife()
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