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
 

How do I make a knock over script?

Previous Thread :: Next Thread 
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 04:38 PM
I'm making a disaster game and I want to put a script in any disaster so when the disaster touches a tower it tilts it or knocks it over. Before you call me an idiot, I have no idea where to start with the script so if you could at least start it I would appreciate it.
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 04:43 PM
Bump. :/
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
03 Nov 2012 04:47 PM
--This has to be put a brick. Such as a disasters arm, torso, head, etc.

function Touch(hit)
hit:BreakJoints()
end

script.Parent.Touched:connect(Touch)
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 04:47 PM
I don't want the person to die, I want a tower to be able to be knocked over once the disaster hits hard enough.
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
03 Nov 2012 04:52 PM
There is no function to do that. There are some methods to use to make your own cutom function to do this. I'll try, here:

name = "TowerName" --Put tower name here.

function onTouch(hit)
if hirt.Parent.Name == name then
hit.CFrame = hit.CFrame + Vector3.new(10,0,0)
end
end

script.Parent.Touched:connect(onTouch)
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
03 Nov 2012 04:52 PM
if hit.Parent.Name == name then*
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 04:54 PM
But I want the disaster to be able to hit any tower and knock it over.
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
03 Nov 2012 04:58 PM
names = {"TowerName1","TowerName2","TowerName3}" --Put tower name here.

function onTouch(hit)
for i = 1, #names do
if hit.Parent.Name == names[i] then
hit.CFrame = hit.CFrame + Vector3.new(10,0,0)
end
end
end

script.Parent.Touched:connect(onTouch)
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
03 Nov 2012 05:00 PM
Legend seems to be picky...
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:01 PM
What would I put the script in to make it work?
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:03 PM
If I needed this to go into a zombie, then would I put it in its arms, torso, head, and legs?
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:07 PM
What about a script that if a disaster touches it, it just makes it tilt a little, but if enough force is applied to it, then it falls?
Report Abuse
aasonichedgehog is not online. aasonichedgehog
Joined: 25 May 2011
Total Posts: 1232
03 Nov 2012 05:08 PM
if its something like a tornado, you could put it in the block that houses the mesh, that way when the tornado hits the building, it looks like its literrally tearing it apart!
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:09 PM
How would I do that?
Report Abuse
thumper10 is not online. thumper10
Joined: 17 Apr 2009
Total Posts: 3304
03 Nov 2012 05:09 PM
YOU ARE ASKING WAY TOO MANY QUESTIONS FOR ONE TOPIC! Chill out!
Let's start with knocking the Tower over, I believe there is a Rotate Model API Created by Anaminus (or someone else). Give me a moment to search for it.

- thumper10, C# Lover
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:09 PM
@LUV

The very first script you posted I tried. It doesn't work.
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
03 Nov 2012 05:10 PM
step 1: study physics of roblox
step 2: depend on it.
Report Abuse
thumper10 is not online. thumper10
Joined: 17 Apr 2009
Total Posts: 3304
03 Nov 2012 05:12 PM
I can't seem to find because I'm too lazy. However there is an API that allows for easy rotation of a model. I wouldn't recommend it though, rotating a large tower with many parts can cause a physics engine overload. Imagine updating the position of everything touching it to match it's tilt. *shiver*

- thumper10, C# Lover
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
03 Nov 2012 05:13 PM
dats y u depemd on da phryciz of roblox!!

n CFrame doesnt go with thye phycis of roblx
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:15 PM
Does the last script that LUV told me work? How do I test it?
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
03 Nov 2012 05:15 PM
nope, by testn
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:18 PM
How do I test it? It didn't work for me.
Report Abuse
thumper10 is not online. thumper10
Joined: 17 Apr 2009
Total Posts: 3304
03 Nov 2012 05:19 PM
No need to test. I can tell you it won't give you the desired result. Go look in Free Models for "Model Rotation", and find a good one to use. Learn how to use it an enjoy.

- thumper10, C# Lover
Report Abuse
legend8887 is not online. legend8887
Joined: 06 Nov 2010
Total Posts: 13765
03 Nov 2012 05:32 PM
Why wouldn't I like it?
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