Hello,
I’m trying to make it so it tweens the GUI for everyone, But, it only shows for the player who fired the event. I already got the Highlight and sound to work, could anyone please help me?
This is the code.
local Rep = game:GetService("ReplicatedStorage")
local Event = Rep.DirectionRE.RedGreen
local OnOff = true
local Sound = game.Workspace.DoorsDirection.Sound
--Info1 Pos = {0.5, 0},{0, 0}
--Info2 Pos = {0.5, 0},{0.039, 0}
Event.OnServerEvent:Connect(function(plr)
local PlayerGUI = plr.PlayerGui
local ModifyText = plr.PlayerGui.TextInfo
if OnOff == true then
game.Workspace.DoorsDirection.RedGreen.Highlight.Enabled = true
Sound:Play()
ModifyText.Info1.Text = "Head To Your Next Game,"
ModifyText.Info2.Text = "Red Light, Green Light"
PlayerGUI.TextInfo.Info1:TweenPosition(UDim2.new(0.5, 0,0, 0),
"Out",
"Quart",
2,
true)
PlayerGUI.TextInfo.Info2:TweenPosition(UDim2.new(0.5, 0,0.039, 0),
"Out",
"Quart",
2,
true)
wait(2)
Sound:Play()
OnOff = false
else
PlayerGUI.TextInfo.Info1:TweenPosition(UDim2.new(0.5, 0,-0.5, 0),
"In",
"Quart",
1,
true)
PlayerGUI.TextInfo.Info2:TweenPosition(UDim2.new(0.5, 0,-1, 0),
"In",
"Quart",
1,
true)
wait(1)
game.Workspace.DoorsDirection.RedGreen.Highlight.Enabled = false
OnOff = true
end
end)
Sorry if the code is messy