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

big chungus gui not appearing when touching button help?

so basically i have a big chungus image gui inside starter gui but its invisible so it only turns visible when a player touched a door so the big chungus turns visible and it covers the whole screen and so the player freaks out (jumpscare). ill also add horror murdering scene scream after but thats up for another question the thing with the big chungus image is that its not appearing when player touches the door and idk why ive been trying for 2 hours now and nothing will do so yeah guys pls help me heres my big chungus code:

local bigchungusscreamer = game.StarterGui.BIGCHUNGUS.Image
local door = game.Workspace.HauntedMansion.Hall.Door

door.Touched:Connect(function(part)
	if part.Parent:FindFirstChild("Humanoid") then
		bigchungusscreamer.Visible = true
		part.Parent.Player:Kill()
	end
end)

also pls help me make it so the player who touches the door dies but doesnt respawn so it has to endure the whole screaming and chungus screamer ntil he leaves the game the script is not working on that aspect either

4 comments

0

You put game.StarterGui. You can't edit a GUI from the starterGui. Instead put local gui = game.Players.LocalPlayer.PlayerGui.BIGCHUNGUS.Image

0

when a player plays, all the startergui is put into the PlayerGui

0

ok going to test it out thx in advance

0

i tested it and it workd on studio but when i tried it on server it didnt

1 answer

So, guis are a local sided object, and when you did local bigchungusscreamer = game.StarterGui.BIGCHUNGUS.Image you were refrecing the gui that is in startergui so it won't show up because when a player join all StarterGui's desendants are put in game.Players.LocalPlayer.PlayerGui. So you're script gotta be in a local script (since LocalPlayer can only be done inside a local script)

local Player = game:GetService("Players").LocalPlayer
local bigchungusscreamer = Player.PlayerGui.BIGCHUNGUS.Image -- put your guis here
local door = game.Workspace.HauntedMansion.Hall.Door
	door.Touched:Connect(function(part)
		if part.Parent:FindFirstChild("Humanoid") then
	        	bigchungusscreamer.Visible = true
	        	part.Parent.Player:Kill()
		end
	end)

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