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

Having trouble with accessing player's guis. Any Help?

Asked by 5 years ago

So I am trying to make a cafe ordering system, and once I give them the order, they don't get a gui I want to show up on their screen. Sorry If this doesn't make sense, but here is the script

frame2.TextButton.MouseButton1Click:Connect(function()
                local Overhead = game.Lighting.Overhead:Clone()
            Overhead.TextLabel.Text = "Awaiting Order Number: "..frame2.odd.Text
            game.ReplicatedStorage.RemoteEvent:FireServer()
            print(target.Name)
            Overhead.Parent = target.Character.Head
            game.ReplicatedStorage.yeet:FireServer(target, frame2)
            game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui').Order.Frame2:TweenPosition(UDim2.new(0, 0,1.079, 0, "In", "Linear"))
            print(target)
            target:WaitForChild("PlayerGui").Order.PlrFrame:TweenPosition(UDim2.new(0, 0,0.757, 0), "Out", "Linear")
            print("waiting")
            wait(15)
            target:WaitForChild("PlayerGui").Order.PlrFrame:TweenPosition(UDim2.new(-1, 0,0.757, 0), "In", "Linear")
        end)

Specifically, I am having trouble with this part

target:WaitForChild("PlayerGui").Order.PlrFrame:TweenPosition(UDim2.new(0, 0,0.757, 0), "Out", "Linear")
            print("waiting")
            wait(15)
            target:WaitForChild("PlayerGui").Order.PlrFrame:TweenPosition(UDim2.new(-1, 0,0.757, 0), "In", "Linear")

Any help would be appreciated! Thanks For Reading. By the way, I want it so it only shows up on the target's screen, but its not showing up at all.

Answer this question