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

I need a answer why doesn't this script work, it's about make gui visible or ..... Please help me!?

frame = game.StarterGui.ScreenGui.Frame
team = BrickColor.new("Bright red")
team2 = BrickColor.new("Bright blue")
team3 = BrickColor.new("Bright yellow")


function onTouched(hit)
	if hit.Parent:findFirstChild("Humanoid") ~= nil then
		if 	game.Players:FindFirstChild(hit.Parent.Name).TeamColor == team2 then
			print("gea")
		elseif game.Players:FindFirstChild(hit.Parent.Name).TeamColor == team then
			game.Players:FindFirstChild(hit.Parent.Name).TeamColor = team3
			frame.Visible = true
			wait(5)
			frame.Visible = false
		end
	end
end

script.Parent.Touched:connect(onTouched)

Help please! Why doesn't the GUI pop up!

1 answer

✓ Accepted answer

Hello you're trying to change StarterGui(StarterGui will be in Players GUI when they reset or join the server) Players gui is in the Player's folder, it is located in Players service, So to reach it you will need a local script and it's gonna be like this game.Players.playersname.PlayerGui

1 comment

0

Holy!!!!!!!!! Thank you so much!!!!!!!!!!

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