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

can't clone a GUI inside local scripts? [SOLVED]

Asked by 2 years ago
Edited 2 years ago

i'm trying to make a killfeed, i'm pretty sure the problem is :Clone()

tho i might be wrong, any help will be appreciated

remote.OnClientEvent:Connect(function(plr)
    if plr.Name then
        local gui = script.Killfeed:Clone()
        gui.Parent = script.Parent.Frame

        local userId = plr.UserId
        local thumbType = Enum.ThumbnailType.HeadShot
        local thumbSize = Enum.ThumbnailSize.Size420x420
        local content = plr:GetUserThumbnailAsync(userId, thumbType, thumbSize)

        local tween = tweenService:Create(gui, info, property)
        local tween2 = tweenService:Create(gui, info, {Transparency = 1})

        gui.ImageLabel.Image = content

        gui.Killed.Text = "Killed:".. plr
        tween:Play()
        task.wait(3)
        tween2:Play()

        tween2.Completed:wait()
        gui:Destroy()
    end
end)
0
Try putting your GUI in ReplicatedStorage, then define the path to that GUI like you did on line 3, and try running it again. PaleNoobs 37 — 2y
0
it doesn't work sadly.. vendinY 5 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

okay, i fixed it by doing :FireAllClients() instead of :FireClients()

Ad

Answer this question