I am trying to make a game like JailBreak but more different

Hello,

This is my first post.
I am trying to make a game like JailBreak/ Mad City not a lot copying but I need help doing the script it didnt work.
I am trying to make a robbable bank !
I tried it 3 times but it still didnt work.
So if you could help me with the script it would mean a lot to me.
I am just a begginer so I need help.
Thank You !

4 Likes

I cannot help you with the scripting, but you have to show some type of script here so people know what to correct and help you with.

Saying “So if you could help me with the script it would me a lot to me.” does absolutely nothing.

Thank you

1 Like

Ah, this is mistake all beginners make, if you are a beginner. You need to practice first in Lua, and build your knowledge up. AlvinBlox made a video about this on his channel. You need to start off simple and build up.

I watched AlvinBlox and I did his tutorial how to make a robbable bank but it didnt work.

Scripting requires capital letters in certain places. You might need to go and rewatch it to make sure everything is written correctly. Otherwise you will get errors and the script will not work.

Okay Thank you for replying.

It Kinda helped me. :smiley:

I’m talking about the biggest mistake people make while trying to script, you need to start off easy and gain more knowledge along the way. Making something like this with very little knowledge of programming will just frustrate you.

1 Like

I checked that but the script error thing it didnt show me anything.

Hold on. Ima get into studio and show an example, if I can find any errors ._.

You need to do something easier if you have very little knowledge in Lua, trust me this will just frustrate you.

Oh Ok Thank you so much ! :slightly_smiling_face:

Ok thank you ! :slightly_smiling_face:

No problem, you will gain knowledge along the way. Might take a few years but you will be able to do it, just starting out a complex thing like this will just frustrate you.

1 Like

Okay Thank You !
I will try do not big stuff.

Btw I tried doing this 10 or 6 days ago

Not saying you can’t do big things yet, just trying something like this with little knowledge will just frustrate you.

1 Like

Alright so I have a lava script in my game, here is the script.

function onTouched(part)
 local h = part.Parent:findFirstChild("Humanoid")
 if h~=nil then
  h.Health = h.Health-100
 end
end
script.Parent.Touched:connect(onTouched)

This script contains an error. This error is

  12:37:22.754 - Workspace.Lava.Script:2: attempt to index nil with 'findFirstChild'

This means that on line 2, there is an error with ‘findFirstChild’

If I remember correctly, this is happening because I did not capitalize the first F in 'findFirstChild"

Hold on while I check to see if this is correct

1 Like

No, that was not the case. But the errors with scripts will tell you which line and which place the script is in, and then the piece that is causing the error.

1 Like

Okay I do not have the robbable bank yet but I will try and get it because I remember I took a picture of it so I will try and find it if I dont then I will do the script all over again and I will show it here !

Yes, that is right.
Here is an example of a variable like h
Local hum = part.Parent:FindFirstChild(“Humanoid”)

1 Like