FloorWire Guide

From Legacy Roblox Wiki
Revision as of 19:50, 25 July 2011 by >Trappingnoobs (FloorWire doesn't have a 'Source'.)
Jump to navigationJump to search

Introduction

In this guide we will learn what FloorWire is, how to use it and how it's going to benefit us in the future.

What is FloorWire?

FloorWire is an instance found by going to Insert -> Object -> FloorWire in ROBLOX Studio. It is used to create a wire that runs from one instance to another. It's parent property should be set to the parent of the two instances.

How will it benefit us?

Well, the main reason I use FloorWire is to create dynamic lightning.

Guide

The first step

First of all we want to create two parts.

Open up ROBLOX Studio and go to Insert -> Object -> Part. Position it where ever you want.

Repeat this step and position the second part away from the first part.

Name the first part 'PartA' and the second part 'PartB'. You might want to anchor the two parts too.

The second step

Next we need to create the FloorWire instance. One problem, there's some properties of FloorWire that we can't access using the properties pane. So we have to insert a script and edit it with that.

Go to Insert -> Object -> Script.

Make its source as followed:

FloorWire = Instance.new("FloorWire", game.Workspace)

Properties

The FloorWire object consists of many useful properties.

From

One of the FloorWire's properties is called From, it determinds what instance the FloorWire starts from.

So, open up the script you just created and make its source as followed,

FloorWire = Instance.new("FloorWire", game.Workspace)
FloorWire.From = game.Workspace.PartA

To

Another of FloorWire's properties is called To, it determinds what instance the FloorWire runs to.

Make the script's source as followed to change the To property to PartB:

FloorWire = Instance.new("FloorWire", game.Workspace)
FloorWire.From = game.Workspace.PartA
FloorWire.To = game.Workspace.PartB

Color

You can change the color of the FloorWire to make its color how you want it:


FloorWire = Instance.new("FloorWire", game.Workspace)
FloorWire.From = game.Workspace.PartA
FloorWire.To = game.Workspace.PartB
FloorWire.Color = BrickColor.new("Bright yellow")

Transparency

You can change the transparency of the wire by using 0 - 1 numbers. 0 being opaque, 0.5 being transparent, 1 being invisible.

FloorWire = Instance.new("FloorWire", game.Workspace)
FloorWire.From = game.Workspace.PartA
FloorWire.To = game.Workspace.PartB
FloorWire.Color = BrickColor.new("Bright yellow")
FloorWire.Transparency = 0.5

WireRadius

You can customize the radius of the wire by changing the value of this property, 0.0625 is the default, meaning the higher the numbers, the bigger your wire.


FloorWire = Instance.new("FloorWire", game.Workspace)
FloorWire.From = game.Workspace.PartA
FloorWire.To = game.Workspace.PartB
FloorWire.Color = BrickColor.new("Bright yellow")
FloorWire.Transparency = 0.5
FloorWire.WireRadius = 1.5

Have fun playing with your FloorWire!