Signup for scripting for coolieman2
2 posters
Page 1 of 1
Signup for scripting for coolieman2
1:A rail detector.
If you use function "function _G.Raildetect()" it will detect when a player will go through. I made a longer debounce because it takes time for the player to go away from the detector. There is a script in "Game.Workspace.StrandedEntries" and the detector brick would be "RailDetect".
Game.Workspace.StrandedEntries.RailDetect.Touched:connect(function()
debounce = true
if debounce then do
_G.RailDetect()
debounce = false
wait(10)
else
return end)
end)
So i know this is a small script but it will give you possibilities to make vehicle detectors. It doesn't have to be trains necessarily.
2:Vending machine
So i know this is old because i have made it before but i just wanted it to be an entry.
function Event()
local A = Instance.new("Part", Game.Workspace)
A.Size = Vector3.new(1, 1, 1)
A.Position = Vector3.new(-38.4, 5, 40.7)
wait(10)
A.Name = "Piece of something"
A:Destroy()
end
Game.Workspace.VendingMachine.Button.ClickDetector.MouseClick:connect(Event)
It works in my scripting showcase.
3:AddPart global function.
So this is a function that takes a call and makes a part and sets the properties to what you want. Also the function just has so many parameters it doesn't fit on one row on the forums. You need to provide all the values of the properties listed inside the function. This is so you could just call a global function and provide the properties instead of doing "NEWPART = Instance.new("Part", Game.Workspace)" and then editing the properties seperately.
function _G.AddPart(BrickColor, Material, Reflectance, Transparency, Name, Parent, Position, Rotation, RotVelocity, Velocity, Anchored, Archivable, CanCollide, Locked, Elasticity, FormFactor, Friction, Shape, Size, BackParamA, BackParamB, BackSurfaceInput, BottomParamA, BottomParamB, BottomSurfaceInput, FrontParamA, FrontParamB, FrontSurfaceInput, LeftParamA, LeftParamB, LeftSurfaceInput, RightParamA, RightParamB, RightSurfaceInput, TopParamA, TopParamB, TopSurfaceInput, BackSurface, BottomSurface, FrontSurface, LeftSurface, RightSurface, TopSurface)
NEWPART = Instance.new("Part", Game.Workspace)
NEWPART.BrickColor = BrickColor
NEWPART.Material = Material
NEWPART.Reflectance = Reflectance
NEWPART.Transparency = Transparency
NEWPART.Name = Name
NEWPART.Parent = Parent
NEWPART.Position = Position
NEWPART.Rotation = Rotation
NEWPART.RotVelocity = Rotvelocity
NEWPART.Velocity = Velocity
NEWPART.Anchored = Anchored
NEWPART.Archivable = Archivable
NEWPART.CanCollide = CanCollide
NEWPART.Locked = Locked
NEWPART.Elasticity = Elasticity
NEWPART.FormFactor = FormFactor
NEWPART.Friction = Friction
NEWPART.Shape = Friction
NEWPART.Size = Size
NEWPART.BackParamA = BackparamA
NEWPART.BackParamB = BackParamB
NEWPART.BackSurfaceInput = BackSurfaceInput
NEWPART.BottomParamA = BottomParamA
NEWPART.BottomParamB = BottomParamB
NEWPART.BottomSurfaceInput = BottomSurfaceInput
NEWPART.FrontParamA = FrontParamA
NEWPART.FrontParamB = FrontParamB
NEWPART.FrontSurfaceInput = FrontSurfaceInput
NEWPART.LeftParamA = LeftParamA
NEWPART.LeftParamB = LeftParamB
NEWPART.LeftSurfaceInput = LeftSurfaceInput
NEWPART.RightParamA = RightParamA
NEWPART.RightParamB = RightParamB
NEWPART.RightSurfaceInput = RightSurfaceInput
NEWPART.TopParamA = TopParamA
NEWPART.TopParamB = TopParamB
NEWPART.TopSurfaceInput = TopSurfaceInput
NEWPART.BackSurface = BackSurface
NEWPART.BottomSurface = BottomSurface
NEWPART.FrontSurface = FrontSurface
NEWPART.LeftSurface = LeftSurface
NEWPART.RightSurface = RightSurface
NEWPART.TopSurface = TopSurface
end
If this is not enough for you just ask.
If you use function "function _G.Raildetect()" it will detect when a player will go through. I made a longer debounce because it takes time for the player to go away from the detector. There is a script in "Game.Workspace.StrandedEntries" and the detector brick would be "RailDetect".
Game.Workspace.StrandedEntries.RailDetect.Touched:connect(function()
debounce = true
if debounce then do
_G.RailDetect()
debounce = false
wait(10)
else
return end)
end)
So i know this is a small script but it will give you possibilities to make vehicle detectors. It doesn't have to be trains necessarily.
2:Vending machine
So i know this is old because i have made it before but i just wanted it to be an entry.
function Event()
local A = Instance.new("Part", Game.Workspace)
A.Size = Vector3.new(1, 1, 1)
A.Position = Vector3.new(-38.4, 5, 40.7)
wait(10)
A.Name = "Piece of something"
A:Destroy()
end
Game.Workspace.VendingMachine.Button.ClickDetector.MouseClick:connect(Event)
It works in my scripting showcase.
3:AddPart global function.
So this is a function that takes a call and makes a part and sets the properties to what you want. Also the function just has so many parameters it doesn't fit on one row on the forums. You need to provide all the values of the properties listed inside the function. This is so you could just call a global function and provide the properties instead of doing "NEWPART = Instance.new("Part", Game.Workspace)" and then editing the properties seperately.
function _G.AddPart(BrickColor, Material, Reflectance, Transparency, Name, Parent, Position, Rotation, RotVelocity, Velocity, Anchored, Archivable, CanCollide, Locked, Elasticity, FormFactor, Friction, Shape, Size, BackParamA, BackParamB, BackSurfaceInput, BottomParamA, BottomParamB, BottomSurfaceInput, FrontParamA, FrontParamB, FrontSurfaceInput, LeftParamA, LeftParamB, LeftSurfaceInput, RightParamA, RightParamB, RightSurfaceInput, TopParamA, TopParamB, TopSurfaceInput, BackSurface, BottomSurface, FrontSurface, LeftSurface, RightSurface, TopSurface)
NEWPART = Instance.new("Part", Game.Workspace)
NEWPART.BrickColor = BrickColor
NEWPART.Material = Material
NEWPART.Reflectance = Reflectance
NEWPART.Transparency = Transparency
NEWPART.Name = Name
NEWPART.Parent = Parent
NEWPART.Position = Position
NEWPART.Rotation = Rotation
NEWPART.RotVelocity = Rotvelocity
NEWPART.Velocity = Velocity
NEWPART.Anchored = Anchored
NEWPART.Archivable = Archivable
NEWPART.CanCollide = CanCollide
NEWPART.Locked = Locked
NEWPART.Elasticity = Elasticity
NEWPART.FormFactor = FormFactor
NEWPART.Friction = Friction
NEWPART.Shape = Friction
NEWPART.Size = Size
NEWPART.BackParamA = BackparamA
NEWPART.BackParamB = BackParamB
NEWPART.BackSurfaceInput = BackSurfaceInput
NEWPART.BottomParamA = BottomParamA
NEWPART.BottomParamB = BottomParamB
NEWPART.BottomSurfaceInput = BottomSurfaceInput
NEWPART.FrontParamA = FrontParamA
NEWPART.FrontParamB = FrontParamB
NEWPART.FrontSurfaceInput = FrontSurfaceInput
NEWPART.LeftParamA = LeftParamA
NEWPART.LeftParamB = LeftParamB
NEWPART.LeftSurfaceInput = LeftSurfaceInput
NEWPART.RightParamA = RightParamA
NEWPART.RightParamB = RightParamB
NEWPART.RightSurfaceInput = RightSurfaceInput
NEWPART.TopParamA = TopParamA
NEWPART.TopParamB = TopParamB
NEWPART.TopSurfaceInput = TopSurfaceInput
NEWPART.BackSurface = BackSurface
NEWPART.BottomSurface = BottomSurface
NEWPART.FrontSurface = FrontSurface
NEWPART.LeftSurface = LeftSurface
NEWPART.RightSurface = RightSurface
NEWPART.TopSurface = TopSurface
end
If this is not enough for you just ask.
Last edited by coolieman2 on Wed Jun 26, 2013 4:57 am; edited 1 time in total (Reason for editing : Added clearer title.)
coolieman2- Posts : 78
Join date : 2013-06-21
Location : Europe meaning i'm in a good timezone :)
Re: Signup for scripting for coolieman2
Strange, I didn't see this. Accepted
jobro13- Posts : 250
Join date : 2013-06-02
Re: Signup for scripting for coolieman2
The last one is a little bit overkill, don't you think? Because you have to put in EVERY single property on the function.
coolieman2- Posts : 78
Join date : 2013-06-21
Location : Europe meaning i'm in a good timezone :)
Re: Signup for scripting for coolieman2
Did you know that Roblox has a function called "create" (correct me if I'm mistaken). It supports a classname and a table of properties!
jobro13- Posts : 250
Join date : 2013-06-02
Re: Signup for scripting for coolieman2
Really? Well that would be a waste of 10 minutes trying to type in the properties. That's nice to know. It's just annoying to create NEWPART = Instance.new("Part", <Index location>) and then editing the properties seperately.
coolieman2- Posts : 78
Join date : 2013-06-21
Location : Europe meaning i'm in a good timezone :)
Re: Signup for scripting for coolieman2
You could make such thing yourself too
Examples;
Dictionaries!
- Code:
function create(what, props)
local temporary = Instance.new(what)
for i,v in pairs(props) do
temporary[i] = v
end
end
Examples;
- Code:
create("Part", {BrickColor = "Bright blue", Parent = game.Workspace})
or
local normal = {BrickColor = "Bright red", TopSurface = Enum.SurfaceType.Smooth}
create("Part", normal)
Dictionaries!
jobro13- Posts : 250
Join date : 2013-06-02
Re: Signup for scripting for coolieman2
jobro13 wrote:Did you know that Roblox has a function called "create" (correct me if I'm mistaken). It supports a classname and a table of properties
That's incorrect, but many users (myself included) have created such a function themselves and the use of said functions has become widespread due to ease of use. It's not a part of Roblox's default environment though.
Guest- Guest
Re: Signup for scripting for coolieman2
Is that so? I worked with ColorfulBody on a plugin manager sometime and he also used that function. If I am not mistaken, he used a library. I'll look it up.
jobro13- Posts : 250
Join date : 2013-06-02
Similar topics
» Scripting Application for MagicMasterRohan
» Hello! I am coolieman2!
» Signup for magnalite
» Scripting Entry
» Scripting Application
» Hello! I am coolieman2!
» Signup for magnalite
» Scripting Entry
» Scripting Application
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|