Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you change the sword damage script of the linked swords?! [closed]

Asked by 10 years ago

I tried but my game keeps crashing and I barely know the basic of scripting...

Closed as Not Constructive by Articulating, TheGuyWithAShortName, and evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

4 answers

Log in to vote
1
Answered by 10 years ago

This Script tutorial might help you learn basics so you can start doing those things yourself. ****You can do a lot of things, but I'll give you a example I give to people (I teach for free)****

Insert a script into Workspace through BasicObjects (or AdvancedObjects). Next, locate a brick. To locate a brick you must know exactly which parents it has. It kinda works in a step-by-step process. First, insert a brick into Workspace. Right click on the brick in explorer (View>Explorer). And the re-name that brick to BOB. Now, you have a brick with the name BOB. Now you locate BOB through the script. You know how you separate cities and states by commas? That's kinda what you use here. Except here you use a period. So if Workspace is the 'State' and BOB is the 'City'. Then the script turns out to be like this:

1 Workspace.BOB Also, you can use this to select a group of collected bricks or a 'Model'. So for example, if BOB was in a model named House. Your script would be Workspace.House.BOB. Now, you've located the brick, but what are you going to do with it? You can do pretty much anything you like, move it, duplicate it, destroy it, change it's color. But today, we're going to make it flash transparent. So far, you have Workspace.BOB Now, if you have the Properties tab open (View > Properties) . You'll see a lot of options or 'children' Near the top, you'll see Transparency, the maximum transparency is 1, so you'll have to use decimals here. Play around with it. You'll notice the close the amount is to 1, the more transparent it is. 1 is completely invisible. So put that in on the end.

1 Workspace.BOB.Transparency Now, on the end of the script put in how transparent you want the brick to be. Here, well make it completely invisible. You're script should look like this now:

1 Workspace.BOB.Transparency = 1 Now, you want the script to wait, we'll make it wait for 1 second. To do this you have to type wait(1) The number between the parentheses is how many seconds the script will wait before resuming. Now you're script looks like this:

1 Workspace.BOB.Transparency = 1 2 wait(1) Now, for you to see the script in effect, make another command, this time making BOB completely visible. Your script should look like this now:

1 Workspace.BOB.Transparency = 1 2 wait(1) 3 Workspace.BOB.Transparency = 0 Remember to add that wait on the bottom line to make sure that when the script repeats itself, it doesn't crash.

1 Workspace.BOB.Transparency = 1 2 wait(1) 3 Workspace.BOB.Transparency = 0 4 wait(1) Now, what you do is, as the first line, write while true do. And on the bottom line, write end (dont worry the script repeats itself). Your script looks like this:

1 while true do 2 Workspace.BOB.Transparency = 1 3 wait(1) 4 Workspace.BOB.Transparency = 0 5 wait(1) 6 end Sorry if I under-simplified things. I'm learning new scripting methods too.

Ad
Log in to vote
0
Answered by
Tkdriverx 514 Moderation Voter
10 years ago

The "damage" variables.

Log in to vote
0
Answered by 10 years ago

local damage = 5

local slash_damage = PUT HOW MUCH HERE local lunge_damage = 30

Log in to vote
0
Answered by 10 years ago

There are numerous ways to do it, you can either edit the variables (like shown in the above answers) or find it in the properties section of the weapon and change it there.