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 » Scripters
Home Search
 

button spawn

Previous Thread :: Next Thread 
Ness123 is not online. Ness123
Joined: 28 Feb 2009
Total Posts: 331
10 Oct 2017 02:43 AM
i made script for spawning npc's when u click the button it spawns an npc

jimmy = script.Parent--name the part to anything u like


function turnGhostly()
if jimmy.Transparency == 0 then --Replace this to the name of your part
jimmy.Transparency = 0.5 --Replace this to the name of your part
script.Parent.BrickColor = BrickColor.Red()
game.Workspace.push:Play()
wait(1)
game.Workspace.push:Stop()
game.Workspace.jimmy.ClickDetector:remove() --Replace this to the name of your part

local msg = Instance.new("Message")--Copy from here (starting with local..) and paste under the -------'s
msg.Parent = game.Workspace
msg.Text = ("PUT MESSEGE HERE")-- Put what you want to say in between the ""s
wait(3)-- Change the wait if you want its the wait during the text that is up representing the next zombies
msg:remove()
game.Lighting.zombie1:clone().Parent = game.Workspace --Put your npc on lightning
game.Workspace.zombie1:MakeJoints()--Change this to the name of your npc
wait(20)
game.Workspace.zombie1:remove()--Change this to the name of your npc

end
end



jimmy.ClickDetector.MouseClick:connect(turnGhostly) --Replace this to the name of your part
Report Abuse
Ness123 is not online. Ness123
Joined: 28 Feb 2009
Total Posts: 331
10 Oct 2017 02:44 AM
make sure to insert a click detector in the part
Report Abuse
gohan31865 is not online. gohan31865
Joined: 30 Jan 2011
Total Posts: 895
10 Oct 2017 05:56 AM
this is an 09 script

goodness gracious get with the times

:Destroy() not :remove()

don't use messages
don't use lighting
don't use game.Workspace, use workspace

:Connect() not :connect()

i want to strangle u


#code error("you're*")
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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