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

Why isnt my script working? Im trying to make my notificaton message text change for certain plr

Why doesnt this work:

GUI:WaitForChild("DJLiveMix").Event:connect(function()
	if allow then
		allow = false
		Frame.Visible = false
		Label.Text = "DJ LIVE MIX"
		game.Players.PlayerAdded:Connect(function(plr)
	
		if plr.Name == "forsakern" then
			
			Level.Text = workspace.DJGiver.InUse.Value and workspace.DJGiver.InUse.DJ.Value or "DJ Tofuu Is Now Mixing!"
		end
	elseif plr.Name == "Other Player"
	

		Level.Text = workspace.DJGiver.InUse.Value and workspace.DJGiver.InUse.DJ.Value or "DJ Mickey Is Now Mixing!"
		local LVL_HUE = math.clamp(math.random(1, 10) * 100, 1, 1000) / 1000 * 0.8333333333333334
		local color = Color3.fromHSV(LVL_HUE, 1, 1)
		for i, v in ipairs(Lines) do
			v.BackgroundColor3 = color
			v.BackgroundTransparency = 1
		end
		for i, v in ipairs(Lines_LVL) do
			v.BackgroundColor3 = color
			v.BackgroundTransparency = 1
		end
		Frame.Position = UDim2.new(0.5, 0, 0.55, 0)
		Label.TextTransparency, Level.TextTransparency = 1, 1
		Label.TextColor3, Level.TextColor3 = color, color
		animateGUI()
		allow = true
		end)
	end
end)

1 answer

✓ Accepted answer

You didn't say what "plr" was. You have to add it to a variable. You made the function called plr. You didn't say what it was. You'd have to put something like this at the beginning and do some other stuff.

local plr = game.Players.LocalPlayer 

You might have to add more or less, I don't frankly know 100%.

2 comments

0

not working

0

nvm i think i fixed it

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