|
So, I've never scripted before. Have no clue how. I watched a tutorial and now I'm wanting to try something. But here's my problem: I don't know what to script that would be easy enough that I could do it, but challenging enough for me to actually learn something.
All suggestion will be appreciated :D |
|
|
Try reading this http://wiki.roblox.com/index.php?title=Cookbook
Start from the top, go to the bottom. |
|
|
There is also some great youtube tutorials that take you from your first script all the way to advanced stuff. I even think it takes you to making a minigames. Unfortunately I cant post the link on here but it shouldn't be too hard to come upon. |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Try making a function... Maybe like this:
--
local block = script.Parent
block.Touched:connect(function()
print("Hello, world!")
end)
--
System32? Delete it. |
|
blox6137Join Date: 2008-11-23 Post Count: 1109 |
Or if you don't know how to implement a script into a part, maybe this:
local brick = Instance.new("Part", Workspace)
brick.Anchored = true
brick.Touched:connect(function()
brick.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
end)
System32? Delete it. |
|
|
Try a project like making a fading door or something.
Start by making a simple block you touch and the transparency fades then add a NoCollide
--To change the model you group the model and name it FadingDoor and name the fading part(s) Fader.--
--Make sure this script is in the model!--
local brick = Workspace.FadingDoor.Fader
function onTouch(Fader)
brick.Transparency=0.7 --You can change these values if you like
wait(0.1)
brick.Transparency=0.6 --
wait(0.1)
brick.Transparency=0.5 --
wait(0.1)
brick.Transparency=0.4 --
wait(0.1)
brick.Transparency=0.3 --
wait(0.1)
brick.Transparency=0.2 --
wait(0.1)
brick.Transparency=0.1 --
wait(0.1)
brick.Transparency=0 --
wait(0.4)
--print 'Fader Completed.'-- Optional
end
brick.Touched:connect(onTouch) |
|
plistraJoin Date: 2014-03-12 Post Count: 859 |
@Ganja, there is a more efficient way in doing that.
~~
--PLISTRA
local fade = script.Parent
fade.Anchored = true
debounce = false
fade.Touched:connect(function()
if debounce then return end
debounce = ture
for c = 0,1,.1 do
fade.Transparency = c
wait(.25)
end
print("Fader Completed")
debounce = false
end)
~~ |
|
plistraJoin Date: 2014-03-12 Post Count: 859 |
local fade = script.Parent
debounce = false
fade.Touched:connect(function()
if debounce then return end
debounce = true
for c = 0,1,.1 do
fade.Transparency = c
wait(.25)
end
debounce = false
end) |
|
|
|
I'm soon going to be making a full forum post on scripting basics. I'll post the link once it's made. |
|
|