So i tried to make part that gradually fades away, my scripting skills are minimal, and when i tried to execute this script, it did nothing, here’s the line of code i made for that:
There’s a much simpler way to do that. Instead of having large blocks of code like that, you can instead use something called a loop.
for i = 1,0,-0.1 do
script.Parent.Transparency = i
wait(0.1)
end
This is by no means the only way to do this, there are more options such as TweenService if you want to be able to control the fading more. This is just my personal preferred way to do it.
You forgot = but there is an easier way to do this than using a long loop…
Thank you, i’m very new to scripting, so what i usually do, is take free model, dissect it’s code and modify it a little bit.
If you’re new to scripting, that’s actually an amazing way to start in my opinion. Disassembling things that are already made and seeing how they work helps you understand a lot.
That’s exactly what i do, but sometimes it doesen’t work i intend it to.
And that’s what’s so great about the Developer Forum. You can get suggestions to fix it if you’re having an issue with your code.
Agreed, i have some rather cool ideas laying around, that practically wait for me to get good at scripting so i can realize them.
If you’ve just started scripting, another method I would recommend is tutorials on YouTube. I think that AlvinBlox explains everything really well, and helps you understand how you can utilize whatever element in scripting you want to learn about. By no means is this the only channel with tutorials. There are plenty more out there.
Alvin Blox was very helpful indeed, also look into the API references. I was easily self taught by going over these and picking up on new skills here:
@SS4PPHIRE @micheru I tried something a little bit more complex: i tried to make brick act like flasher on emergency vehicles, and can be turned on with a simple button, but that’s where the issue began, i tried linking two scripts together like this:
But the problem is that print command runs anyways.
Okay, what is script.Parent? Is it a TextButton or a ClickDetector or something? Also, is it running on the server or the client? (Script or LocalScript)
(There is a lot wrong with your code but I’ll fix it after I get a general idea of the scenario you’re putting it to use in)
it’s TextButton and it’s running on the server.
Four issues:
-
Give the post a good name - “Need help with script” doesn’t mean anything and literally every scripting support post has that purpose.
-
Using images for code is super annoying. If someone was going to help you, they would have to rewrite the entire thing. Use the code formatting feature.
-
This could be solved by a simple google search, there are plenty of sources out there including the roblox developer wiki.
-
imagine using light mode it hurts my eyes
1 is resolved
2 will do
3 i did that before, i didn’t find anything related to that issue
4 thanks for the suggestion i didn’t know that existed
If you looked it up you clearly haven’t tried hard enough. Literally just go to topics on the developer wiki regarding functions and brick color and you’ll find all your answers.
Thanks for the advice, will do, it’s just that sometimes it’s too complex for my current knowledge of scripting.