In this case I have 2 persons involved, the local player denomined as (“Staff”) and the Target (stated with a textbox), now it comes that when the Staff press the buttom it fires the client to connect with a local script where GUI TweensPosition to new one for the Target, after attemping to give PlayerGui a value with :WaitForChild() or :FindFirstChild() I get same error.
Here are the scripts
Server Sided:
script.Parent.Parent.StaffPromptHandler.Purchase.MouseButton1Click:Connect(function()
script.Parent.Parent.StaffPromptHandler:TweenPosition(UDim2.new(0.29, 0,-1.014, 0))
wait(.5)
MCI.Prompt:FireAllClients(Target,"CustomerHandler")
print("sent command customer handler for:" .. Target.Name)
end)
LocalScript:
MCI.Prompt.OnClientEvent:Connect(function(Target, command)
if command == "CustomerHandler" then
local Text = script.Parent.System.Player.Text
local Target = game:GetService("Players"):FindFirstChild(Text)
Target.PlayerGui.MCICustomerPromptHandler:TweenPosition(UDim2.new(0.29, 0,0.014, 0))
print("Sent customer handler")
end
end)