i made a script that sets a value from a name. but it keeps giving me dealergui is not a valid member of playergui.
script that calls the event:
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Visible = false script.Parent.Parent.Parent.Frame.Visible = false script.Parent.Parent.Parent.Frame2.Visible = true script.Parent.Parent.Parent.CarMenu.Visible = true script.Parent.Parent.Parent.CarMenu.TextLabel.Text = "AcCobra" game.ReplicatedStorage.CarToBuy:FireServer("AcCobra") local e = game.ReplicatedFirst.AcCobra:Clone() e.Parent = game.Workspace.CurrentCamera e:SetPrimaryPartCFrame(game.Workspace.dealertp.CFrame) end)
event script:
game.ReplicatedStorage.CarToBuy.OnServerEvent:Connect(function(player,name) player:WaitForChild("PlayerGui").DealerGui.CarToBuy.Value = name end)
thanks
Its hard to see if DealerGui is not a valid member of PlayerGui. You need to check for yourself if you wrote your Variable correctly. Check if you wrote everything correctly and you did no typo. Reasons for that Error could be that you wrote the wrong path or your actuall DealerGui has no upper D and upper G and i completly small written. Check all that and it should be good to go.