Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

StarterGui is not a valid member of DataModel error?

So I'm making a Gui for a game of mine. Each button has a different camera. i had my output tab open thsi is what it says after i test the game.

13:54:28.735 - escape the facility_AutoRecovery_0.rbxl auto-recovery file was created 13:54:56.821 - StarterGui is not a valid member of DataModel 13:54:56.823 - Stack Begin 13:54:56.823 - Script 'Plugin_UIEditor.rbxm.UIEditor.Plugin.main', Line 424 13:54:56.824 - Stack End 13:55:00.352 - StarterGui is not a valid member of DataModel 13:55:00.354 - Stack Begin 13:55:00.355 - Script 'Plugin_UIEditor.rbxm.UIEditor.Plugin.main', Line 424 13:55:00.356 - Stack End 13:55:01.995 - SliceCenter ((499.000000,112.000000), (501.000000,113.000000)) is outside the bounds of imageOffset ((492.000000,112.000000), (493.000000,113.000000)) for GuiImage[CoreGui.TopBar.TopBarFrame.RightFrame.MoreMenu.MoreMenuContainer.OverlayContextualMenu.PositionFrame.BaseMenu.ClippingFrame.ScrollingFrame.cell 2] 13:55:01.997 - SliceCenter ((507.000000,112.000000), (509.000000,113.000000)) is outside the bounds of imageOffset ((500.000000,112.000000), (501.000000,113.000000)) for GuiImage[CoreGui.TopBar.TopBarFrame.RightFrame.MoreMenu.MoreMenuContainer.OverlayContextualMenu.PositionFrame.BaseMenu.ClippingFrame.ScrollingFrame.cell 2.StateOverlay] script startup

i'm new to scripting but i do understand some stuff

btw when my mouse hovers over the line"13:55:00.352 - StarterGui is not a valid member of DataModel" it says that it has no source

wait(0.1)
print("script startup")

--locals--

--frames--

local StartFrame = game.playscreen.startmenu.startframe
local CreditsFrame = game.playscreen.startmenu.creditsframe
local MenuFrame = game.playscreen.startmenu.menuframe
local SettingsFrame = game.playscreen.startmenu.settingsframe

--camera's--

local camera = game.workspace.CurrentCamera
local player = game.Players.LocalPlayer
local FocusLaptopPart = game.Workspace.laptopfocus
local FocusCreditPart = game.Workspace.creditfocus
local FocusKnifePart = game.Workspace.knifefocus
local FocusStartPart = game.Workspace.startfocus

--code--
camera.CameraType = "Scriptable"

camera.CFrame = FocusStartPart.CFrame

--startbutton--

MenuFrame.startbutton.MouseButton1Click:Connect(function()
	StartFrame.Visible = true
	camera.CFrame = FocusKnifePart.CFrame
end)

--creditsbuton--

MenuFrame.creditbutton.MouseButton1Click:Connect(function()
	CreditsFrame.Visible = true
	camera.CFrame = FocusCreditPart.CFrame
end)

2 comments

0

What is play screen?

0

its the place i put my frames in for my guis its in my gui folder

1 answer

If you are using StarterGui to change a players GUI you should use PlayerGui. So player.PlayerGui instead of player.StarterGui.

So I’m assuming that if play screen is connected to StarterGui you would say:

game.Players.LocalPlayer (which you set to player below where you did the frames)

player.PlayerGui.whatever you have in starterGui.

So if you had a frame in starter GUI it would be player.PlayerGui.Frame

1 comment

0

soooo what do i have to change and where

This discussion is preserved as it was. New answers, comments, and votes are closed.