Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

Error: 18:12:04.977 - Workspace.Model.Script:72: Expected , 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

3 comments

0

Here's how to detect when the part is touched: game.Workspace.(Part that you want to be touched without the parenthethes)

0

make a loop kid

0

or atleast make a function that called showPart()

1 answer

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!

3 comments

0

thx so much im just started to get into this type of stuff thx big help :)

0

Somthing happend it says this now 18:40:59.606 - Workspace.Model.Script:1: Expected identifier, got '('

0

Put a ) at the end of the last end.

This discussion is preserved as it was. New answers, comments, and votes are closed.