Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Guis not tweening properly?

Asked by 5 years ago
Edited 5 years ago

So I have a thing that's supposed to tell a player what their role is for a round, but it doesn't fade out how it's supposed to... actually it doesn't fade out at all. I can't play test this and get an output because my game only works with 4 or more people, but I can try to modify the script a little bit if it's necessary; but I'm kinda just looking for some noticeable errors with this script. [Server Script in Server Script Service] ``` local rs = game:GetService("ReplicatedStorage")

local youareaevent = Instance.new("RemoteEvent")

youareaevent.Parent = rs

youareaevent.Name = ("YouAreAEvent")

--later in the script

for a, player in pairs(players) do

local jobgui = game.ServerStorage.JobGui:Clone()

jobgui.Parent = player.PlayerGui

if player == mafia then

jobgui.Frame.JobDesc.Text = (mafiadesc)

jobgui.Frame.Job.Text = ("Mafia")

jobgui.Frame.Job.TextColor3 = Color3.fromRGB(255,0,0)

elseif player.Character:FindFirstChild("DetectiveTag") then

jobgui.Frame.JobDesc.Text = (detectivedesc)

jobgui.Frame.Job.Text = ("Detective")

jobgui.Frame.Job.TextColor3 = Color3.fromRGB(0,0,255)

elseif player.Character:FindFirstChild("DoctorTag") then

jobgui.Frame.JobDesc.Text = (doctordesc)

jobgui.Frame.Job.Text = ("Doctor")

jobgui.Frame.Job.TextColor3 = Color3.fromRGB(255,255,0)

elseif player.Character:FindFirstChild("InnocentTag") then

jobgui.Frame.JobDesc.Text = (innocentdesc)

jobgui.Frame.Job.Text = ("Innocent")

jobgui.Frame.Job.TextColor3 = Color3.fromRGB(0,255,0)

end

end

wait(5)

youareaevent:FireAllClients(player) ```

[Local Script in the Workspace] ``` local ts = game:GetService("TweenService")

local rs = game:GetService("ReplicatedStorage")

local youareaevent = rs:WaitForChild("YouAreAEvent")

youareaevent.OnClientEvent:Connect(function(player)

local tweeninfo = TweenInfo.new(1,Enum.EasingStyle.Linear)

local gui = player.PlayerGui.JobGui

local tweens = {}

local tween = ts:Create(gui.Frame,tweeninfo,{Transparency = 1})

table.insert(tweens)

local tween1 = ts:Create(gui.Frame.Job.BackgroundTransparency,tweeninfo,{Transparency = 1})

table.insert(tween1)

local tween2 = ts:Create(gui.Frame.Job.TextTransparency,tweeninfo,{Transparency = 1})

table.insert(tween2)

local tween3 = ts:Create(gui.Frame.JobDesc.BackgroundTransparency,tweeninfo,{Transparency = 1})

table.insert(tween3)

local tween4 = ts:Create(gui.Frame.JobDesc.TextTransparency,tweeninfo,{Transparency = 1})

table.insert(tween4)

local tween5 = ts:Create(gui.Frame.YouAreA.BackgroundTransparency,tweeninfo,{Transparency = 1})

table.insert(tween5)

local tween6 = ts:Create(gui.Frame.YouAreA.TextTransparency,tweeninfo,{Transparency = 1})

table.insert(tween6)

for a, b in pairs(tweens) do

b:Play()

end

wait(2)

gui:Destroy()

end) ```

0
you can test your game with dummy players in studio by clicking on the test tab and clicking on local sever it will open another roblox game. If u want to add more players you just click the button again. xxbapxx -53 — 5y
0
Do you get any errors? Check the output. Y_VRN 246 — 5y

Answer this question