Hello, I am trying to set the TextColor3 based off of arguments, but for some reason, it’s staying as the default TextColor
(problem located in line 4)
local ct = {}
function ct.start(text, color, stay)
local hold = stay
script.colortext.TextLabel.Text = text
script.colortext.TextLabel.TextColor3 = color
for i,v in pairs(game.Players:GetPlayers()) do
local ui = script.colortext
ui:Clone().Parent = v.PlayerGui
task.wait(hold)
local GUI = v.PlayerGui.colortext
GUI:Destroy()
end
end
return ct
Forummer
(Forummer)
February 7, 2022, 3:20pm
#2
What does the “color” parameter represent? Can you share the line(s) of code where this module function is being called?
It get’s called by the server through a normal script, the “color” parameter determines the TextColor3.
Forummer
(Forummer)
February 7, 2022, 3:26pm
#4
Can you share the lines of code where the module function is called, because obviously that’s where the issue lies.
Forummer
(Forummer)
February 7, 2022, 3:28pm
#6
ct.start("some text here", color here, stay)
I mean when the function is called from the script which requires the ModuleScript.
A script is servicescriptservice:
local RakeScream2 = Instance.new("Sound",game.Workspace) -- 3.336
RakeScream2.Name = "RakeScream2"
RakeScream2.PlaybackSpeed = 0.59
RakeScream2.Volume = 5
RakeScream2.SoundId = "rbxassetid://528621365"
local RakeDied = Instance.new("Sound",game.Workspace) -- 3.336
RakeDied.Name = "RakeDied"
RakeDied.PlaybackSpeed = 0.97
RakeDied.Volume = 8
RakeDied.SoundId = "rbxassetid://266271872"
local PowerOutage = Instance.new("Sound",game.Workspace) -- 4.728
PowerOutage.Name = "PowerOutage"
PowerOutage.SoundId = "rbxassetid://3475534419"
PowerOutage.Volume = 10
local DoomStart = Instance.new("Sound",game.Workspace) -- 35.832
DoomStart.Name = "DoomTheme"
DoomStart.Volume = 10
DoomStart.PlaybackSpeed = 0.55
DoomStart.SoundId = "rbxassetid://153706538"
local DoomTheme = Instance.new("Sound",game.Workspace) -- 101.067
DoomTheme.Name = "NightmareTheme"
DoomTheme.SoundId = "rbxassetid://470697308"
DoomTheme.Volume = 10
DoomTheme.Looped = true
game.Lighting.ClockTime = 7
task.wait(5)
PowerOutage:Play()
RakeScream2:Play()
DoomStart:Play()
task.wait(10)
game.Lighting.FogEnd = 400
game.Lighting.FogStart = 70
game.Lighting.FogColor = Color3.fromRGB(0, 0, 0)
task.wait(10)
game.Lighting.ClockTime = 5
game.Lighting.FogColor = Color3.fromRGB(46, 46, 46)
task.wait(17.832)
game.Lighting.ClockTime = 0
game.Lighting.FogColor = Color3.fromRGB(0, 0, 0)
game.Lighting.FogEnd = 70
game.Lighting.FogStart = 20
DoomTheme:Play()
require(8757088093).start("YOUR DOOM IS NEAR", Color3.fromRGB(255, 0, 0), 5)
task.wait(200)
DoomTheme:Stop()
RakeDied:Play()
game.Lighting.FogEnd = 100000
game.Lighting.FogStart = 0
game.Lighting.FogColor = Color3.fromRGB(192,192,192)
task.wait(4)
game:GetService('TweenService'):Create(game.Lighting,TweenInfo.new(4,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{ClockTime = 14}):Play()
RakeScream2:Destroy()
RakeDied:Destroy()
PowerOutage:Destroy()
DoomStart:Destroy()
DoomTheme:Destroy()
Forummer
(Forummer)
February 7, 2022, 3:31pm
#8
require(8757088093).start("YOUR DOOM IS NEAR", Color3.fromRGB(255, 0, 0), 5)
Okay, so this is the line. If you want a different color just change the following bit.
Color3.fromRGB(255, 0, 0)
I found out the problem, i’m an idiot
I was setting the color to red (default textcolor3)
instead of white.
Forummer
(Forummer)
February 7, 2022, 3:39pm
#11
The default value for TextColor3 should be black, that would be Color3.new(0, 0 ,0). If you want white that would be “Color3.new(1, 1, 1)” or “Color3.fromRGB(255, 255, 255)” whichever you prefer/makes more sense to you.