Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Im Trying To Make Blocks Aprear when somthing is touched Help?

Asked by 3 years ago
Edited 3 years ago

Error: 18:12:04.977 - Workspace.Model.Script:72: Expected <eof>, got 'end'\

My Script:

game.Workspace.Model.Obstical1.Transparency = 0 game.Workspace.Model.Obstical1.CanCollide = true

    game.Workspace.Model.Obstical0.Transparency = 0
game.Workspace.Model.Obstical0.CanCollide = true

game.Workspace.Model.Obstical1.Transparency = 0
game.Workspace.Model.Obstical1.CanCollide = true

game.Workspace.Model.Obstical2.Transparency = 0
game.Workspace.Model.Obstical2.CanCollide = true

game.Workspace.Model.Obstical3.Transparency = 0
game.Workspace.Model.Obstical3.CanCollide = true

    game.Workspace.Model.Obstical4.Transparency = 0
game.Workspace.Model.Obstical4.CanCollide = true

    game.Workspace.Model.Obstical5.Transparency = 0
game.Workspace.Model.Obstical5.CanCollide = true

        game.Workspace.Model.Obstical6.Transparency = 0
game.Workspace.Model.Obstical6.CanCollide = true

        game.Workspace.Model.Obstical7.Transparency = 0
game.Workspace.Model.Obstical7.CanCollide = true

    game.Workspace.Model.Obstical8.Transparency = 0
game.Workspace.Model.Obstical8.CanCollide = true

game.Workspace.Model.Obstical9.Transparency = 0
game.Workspace.Model.Obstical9.CanCollide = true

game.Workspace.Model.Obstica21.Transparency = 0
game.Workspace.Model.Obstica21.CanCollide = true

game.Workspace.Model.Obstica20.Transparency = 0
game.Workspace.Model.Obstica20.CanCollide = true

game.Workspace.Model.Obstica31.Transparency = 0
game.Workspace.Model.Obstica31.CanCollide = true

game.Workspace.Model.Obstica32.Transparency = 0
game.Workspace.Model.Obstica32.CanCollide = true

game.Workspace.Model.Obstica33.Transparency = 0
game.Workspace.Model.Obstica33.CanCollide = true

game.Workspace.Model.Obstica34.Transparency = 0
game.Workspace.Model.Obstica34.CanCollide = true

game.Workspace.Model.Obstica35.Transparency = 0
game.Workspace.Model.Obstica35.CanCollide = true

game.Workspace.Model.Obstica36.Transparency = 0
game.Workspace.Model.Obstica36.CanCollide = true

game.Workspace.Model.Obstica37.Transparency = 0
game.Workspace.Model.Obstica37.CanCollide = true

game.Workspace.Model.Part1.Transparency = 0
game.Workspace.Model.Part1.CanCollide = true

game.Workspace.Model.Part2.Transparency = 0
game.Workspace.Model.Part2.CanCollide = true

game.Workspace.Model.Part3.Transparency = 0
game.Workspace.Model.Part3.CanCollide = true

game.Workspace.Model.Part4.Transparency = 0
game.Workspace.Model.Part4.CanCollide = true    

end

0
Here's how to detect when the part is touched: game.Workspace.(Part that you want to be touched without the parenthethes) e6_4KOkGsp 40 — 3y
0
make a loop kid jgftr7 74 — 3y
0
or atleast make a function that called showPart() jgftr7 74 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Sorry, there was a type up there. Here's how to detect when the part is touched:

game.Workspace.(Part that you want to be touched without the parenthethes).Touched:Connect(function()

end

By the way, much shorter way to do all of those parts that you want to change would be to put them all into a folder.

for a, b in pairs(game.Workspace.Folder:GetChildren()) do

-- a, b in pairs goes through all of the objects in the parenthehes in order. The GetChildren() gets the all the objects inside of the folder.

b.CanCollide = false
b.Transparency = false

-- The "b" is the object it's currently on in the list. end

If you have any more questions just let me know!

0
thx so much im just started to get into this type of stuff thx big help :) JordanTheDev_Team 33 — 3y
0
Somthing happend it says this now 18:40:59.606 - Workspace.Model.Script:1: Expected identifier, got '(' JordanTheDev_Team 33 — 3y
0
Put a ) at the end of the last end. e6_4KOkGsp 40 — 3y
Ad

Answer this question