GUI not showing up in game

I’m making a character selection GUI

but the GUI shows up in-Studio but in-game it doesn’t

looks in studio

looks in game

i don’t know what wrong here

here is how the explorer is organized

Screen Shot 2022-06-30 at 10.47.57 AM

There’s a script that generates the character icons

a LocalScript named mainScript

characters = game.ReplicatedStorage.characters
content = script.Parent.mainFrame.ScrollingFrame


wait()

for i,v in pairs(characters:GetChildren()) do
	if v:FindFirstChild('Humanoid') then
		local ViewportFrame = Instance.new("ViewportFrame")
		ViewportFrame.Parent = content
		ViewportFrame.BackgroundTransparency = 1

		local Button = Instance.new("TextButton")
		Button.Parent = ViewportFrame
		Button.Position = UDim2.new(0,0,1,0)
		Button.Size = UDim2.new(1,0,0,15)
		Button.BorderSizePixel = 0
		Button.BackgroundColor3 = Color3.fromRGB(255,255,255)
		Button.Text = v.Name
		Button.TextScaled = true
		
		
		local Preview = v:Clone()
		Preview.Parent = ViewportFrame

		local Camera = Instance.new("Camera")
		Camera.Parent = ViewportFrame
		Camera.CFrame = Preview.Head.CFrame + Preview.Head.CFrame.LookVector * 5
		Camera.CFrame = CFrame.new(Camera.CFrame.Position,Preview.Head.Position)

		ViewportFrame.CurrentCamera = Camera
		
		changeLocal = script.Parent:FindFirstChild("changeLocal"):Clone()
		
		changeLocal.Parent = Button
		changeLocal.Disabled = false
		
		local stringValue = Instance.new('StringValue')
		stringValue.Parent = Button
		stringValue.Value = v.Name
		stringValue.Name = 'CharacterName'
		
		Button.MouseButton1Click:Connect(function()
			script.Parent.Enabled = false
		end)
		
	end
end

Another script

LocalScript changeLocal

local changeEvent = game.ReplicatedStorage:WaitForChild("setSubject")

local characterValue = script.Parent:WaitForChild("CharacterName")

local isCool = false
local coolTime = 1

script.Parent.MouseButton1Click:Connect(function(player)
	if isCool == false then
		isCool = true
		local charactername = characterValue.Value
		changeEvent:FireServer(charactername)
	end
end)

changeEvent.OnClientEvent:Connect(function()
	wait(coolTime)
	isCool = false
end)

any help would be great (:

1 Like

Did you publish the latest version?
Is there any errors in the actual game?
(Join the game and type /console in the chat.)

2 Likes

I didn’t look into your scripts too much but this sounds like the same issue I had earlier. When you created the place, you may have had a box ticked that says something about enabling team create. With this on, when you edit a script, you have to right click it on the top bar and click Apply Edits for it to actually save.

As far as turning it off, I tried for like 30 minutes, even unticking the team create box in game settings with no luck. Ended up just creating a whole new place with the box unticked this time and copy pasted everything over from the old place.

2 Likes