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 » Game Design
Home Search
 

Re: Help [SCRIPT]

Previous Thread :: Next Thread 
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 11:33 AM
handle = script.Parent
sword = script.Parent.Parent["Iron Sword"]
part1=sword.Part1
part2=sword.Part2
part3=sword.Part3
part4=sword.Part4
slash = true

function Weld(x,y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end


function Get(A)
if A.className == "Part" then
Weld(script.Parent.Handle, A)
A.Anchored = false
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i])
end
end
end

function Finale()
Get(script.Parent)
end

script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()
slash = true
function Slash()
sword.GripUp = Vector3.new(1, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(3, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(5, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(7, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(4, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(3, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(2, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(1, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(0, 1, 0)
end

sword.Activated:connect(Slash)

sword.Part1.Touched:connect(function(hit)
if slash == false then return end
slash = false
if hit.ClassName == "Part" and hit.Name ~= "Handle" and hit.Parent.Humanoid then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - sword.Damage.Value
wait(0.4)
slash = true
end
end)

sword.Part4.Touched:connect(function(hit)
if slash == false then return end
slash = false
if hit.ClassName == "Part" and hit.Name ~= "Handle" and hit.Parent.Humanoid then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - sword.Damage.Value
wait(0.4)
slash = true
end
end)

The last 2 functions only work once.
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 12:12 PM
BUMP
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 12:23 PM
Please help?
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 06:51 PM
bump
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 07:01 PM
no one?
Report Abuse
CronZero is not online. CronZero
Joined: 12 Dec 2014
Total Posts: 6616
24 Jan 2015 07:29 PM
[ Content Deleted ]
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 07:39 PM
What function might be "null'd"
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 07:43 PM
?
Report Abuse
CronZero is not online. CronZero
Joined: 12 Dec 2014
Total Posts: 6616
24 Jan 2015 07:44 PM
[ Content Deleted ]
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 07:50 PM
I might be able to fix it
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 07:54 PM
New Script:
handle = script.Parent
sword = script.Parent.Parent["Iron Sword"]
part1=sword.Part1
part2=sword.Part2
part3=sword.Part3
part4=sword.Part4
slash = true

function Weld(x,y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end


function Get(A)
if A.className == "Part" then
Weld(script.Parent.Handle, A)
A.Anchored = false
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i])
end
end
end

function Finale()
Get(script.Parent)
end

script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()
slash = true
function Slash()
sword.GripUp = Vector3.new(1, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(3, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(5, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(7, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(4, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(3, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(2, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(1, 1, 0)
wait(0.1)
sword.GripUp = Vector3.new(0, 1, 0)
end

sword.Activated:connect(Slash)

sword.Part1.Touched:connect(function(hit)
if slash == true then
slash = false
if hit.ClassName == "Part" and hit.Name ~= "Handle" and hit.Parent.Humanoid then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - sword.Damage.Value
wait(0.4)
slash = true
end
end
end)

sword.Part4.Touched:connect(function(hit)
if slash == true then
slash = false
if hit.ClassName == "Part" and hit.Name ~= "Handle" and hit.Parent.Humanoid then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - sword.Damage.Value
wait(0.4)
slash = true
end
end
end)

Didn't work, got this output

20:52:58.070 - Humanoid is not a valid member of Workspace
Report Abuse
TrustMeImRussian is online. TrustMeImRussian
Joined: 19 May 2011
Total Posts: 4772
24 Jan 2015 07:56 PM
Can't just post a script and say help... especially on the wrong forum...... What's the problem with it?
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 07:57 PM
reread the post and reread scripters forum definition.
Report Abuse
TrustMeImRussian is online. TrustMeImRussian
Joined: 19 May 2011
Total Posts: 4772
24 Jan 2015 08:00 PM
Post it on Scripters, hence the name.
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 08:14 PM


ROBLOX Forum » Game Creation and Development
Home Search MyForums

Game Creation and Development Threads Posts Last Post
Game Marketing
This is where you show off your awesome creations, talk about how to advertise your game or share your marketing and sale tactics.
3,991 22,642
06:08 PM
Cheeso135
Game Design
This is the forum to get help, talk about future ROBLOX game ideas, or gather an awesome building team.
44,718 261,580
06:11 PM
Bubu2319
Scripters
This is the place for discussion about scripting. Anything about scripting that is not a help request or topic belongs here.
61,258 821,910
06:08 PM
oscar9999991
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 08:14 PM
"Scripters
This is the place for discussion about scripting. Anything about scripting that is not a help request or topic belongs here."
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 08:17 PM
bump
Report Abuse
TrustMeImRussian is online. TrustMeImRussian
Joined: 19 May 2011
Total Posts: 4772
24 Jan 2015 08:18 PM
Don't beg for help. Ask what's the best way to have this script coded. Boom.
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 08:21 PM
go learn what bumping is k?
oh nevermind you didn't go read the definition of scripters either
it means get it to the top of the forum
then people will notice it more
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 08:28 PM
bump
Report Abuse
TrustMeImRussian is online. TrustMeImRussian
Joined: 19 May 2011
Total Posts: 4772
24 Jan 2015 08:33 PM
Actually I'm pretty sure I know what it means, I have a total of 60k+ posts that mostly came from Script helper and Build helper. Don't try to undermine me.
Report Abuse
TrustMeImRussian is online. TrustMeImRussian
Joined: 19 May 2011
Total Posts: 4772
24 Jan 2015 08:34 PM
Also, if you're scripting is apparently 8/10 then why can't you figure out such a simple script, huh?
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
24 Jan 2015 08:41 PM
TrustMeImRussian is either a troll or just hasn't seen the post by a moderator which said which forums were going to be merged into what.

Scripting Helpers and Building Helpers got merged into Game Design.

Don't mislead people.
Report Abuse
TrustMeImRussian is online. TrustMeImRussian
Joined: 19 May 2011
Total Posts: 4772
24 Jan 2015 08:48 PM
Obviously a good troll.
Report Abuse
tardysauce is not online. tardysauce
Joined: 05 May 2012
Total Posts: 8444
24 Jan 2015 09:00 PM
if this is such a simple script then fix it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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