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

Trying to make a wall that once a player passes though it brings up a text lable not working?


wall = script.Parent

wall.Touched:Connect(function(hit)	
	local Players = game.Players.LocalPlayer
	local PlayerGui = Players.PlayerGui
	local human = game.Players:FindFirstChild(hit.Parent.Name)
	print('Touched')

		PlayerGui.ScreenGui.Talk1.Visible = true
			wait(8)
		PlayerGui.ScreenGui.Talk1.Visible = false
	script.Disabled = true
		print("SHHHH No talking")
	end
end)

4 comments

0

IM NOT SURE but it might be because the wall has the collisions off? try turning them on and check if it works.

0

nope nothing

0

Try switching Players to plr.

0

^literally does nothing but change a variable data type

1 answer

You have an extra end that doesn't need to be there.

wall = script.Parent

wall.Touched:Connect(function(Players)  
    local Players = game.Players.LocalPlayer
    local PlayerGui = Players.PlayerGui
    local human = game.Players:FindFirstChild(hit.Parent.Name)
    print('Touched')

        PlayerGui.ScreenGui.Talk1.Visible = true
            wait(8)
        PlayerGui.ScreenGui.Talk1.Visible = false
    script.Disabled = true
        print("SHHHH No talking")
end)

4 comments

0

I removed it for you, so it should look like that now.

0

Jesus, that is horrible indenting. Holy crap.

0

I just took the script and removed the extra end, I did nothing else. Those indents were the original script.

0

This is my first time ok sorry

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