pls help me i dont understand how to fix it ive not slept for the whole night and im tired sleepy and drunk and i cant see what wrong with this script i probably shoould go to sleep but i cant leef this half drone so pls help me
script.Parent.Parent.MamaLuig.Touchedi:Connect(function() fori = 1,10 do script.Parent.Parent.MamaLuigi.Transparency = i/10 end print("success") end)
your script was terribly spelled dude, thats all. your overheating your brain man just go to sleep already. prioritize your health over roblox, if you die you wont be able to keep sleeping so better stay alive. also dont forget to eat healthy, exercise and sleep 8 hours daily to stay good and be able to make amazing scripts. hope this helps bro, have a good day.
script.Parent.Parent.MamaLuigi.Touched:Connect(function() for i = 1,10 do script.Parent.Parent.MamaLuigi.Transparency = i/10 end print("success") end)
The best thing you can do when programming is read over your script multiple times, if you can't figure out what the problem is, it's most likely a spelling error in your script. Lets go through your script line by line to see what exactly you have done wrong.
script.Parent.Parent.MamaLuig.Touchedi:Connect(function()
Here you did not spell MamaLuigi correctly, in programming one of the most important things is to spell your variable names and functions correctly. You also spell Touched wrong.
script.Parent.Parent.MamaLuigi.Touched:Connect(function()
Correct line.
fori = 1,10 do
Here you put the "i" against the "for", programming is no different the English class. It's personal preference but you can also write out the line as for i = 0.1, 1, 0.1
so you don't have to divide "i/10" in the next line and you could keep it as "i".
for i = 1,10 do
Correct line.
script.Parent.Parent.MamaLuigi.Transparency = i/10 end print("success") end)
All of this is correct.
The Output window is your best friend to tell you where you went wrong, you can activate this by selecting the view tab in the top left of studio and pressing the "Output" button.
Read up on Lua errors, this will help you find out where you went wrong, and save you a lot of time.