#dynamic main menu UI script trouble

1 messages · Page 1 of 1 (latest)

deep basin
midnight perch
deep basin
#

so like with image?

#

@midnight perch

#

here

midnight perch
deep basin
#

done

#

here's a vide representation

#

oh wait

#

it's mkv

#

mb

#

converting

midnight perch
#

its all good

#

i can watchit

deep basin
#

done

deep basin
midnight perch
#

i just had to download it to watch

deep basin
#

so umm

midnight perch
#

thats very weird

#

ill look through the code

deep basin
deep basin
#

It's been troubling me for 1hr and I couldn't find any faults

midnight perch
#

camera goes back to normal?

deep basin
#

yes

#

like avg gameplay

midnight perch
#

so smth like this

deep basin
#

yep

#

why are you so fast 💀

midnight perch
#

just asking if you wanted it like that

deep basin
#

my variables are just random words. I'm still a newbie but I'm learning

midnight perch
#

hm

#

first thing

#

dont do UI:Destroy()

#

this means your totally destroying the main menu gui

#

so when they respawn it wont be there

#

unless thats what you want

deep basin
deep basin
#

because if it's respawning then def no

deep basin
#

idk man, tbh I haven't thought much abt it

#

so..

midnight perch
#

an easier method would be just to set the .visible property

#

but its not a big issue

#

anyway

deep basin
#

mhm

midnight perch
#

the only error i can think of is that your setting the camera type before the player is fully loaded maybe?

#

wth

#

why isnt it workin

#
 local character = fallen.Character or fallen.CharacterAdded:Wait()
    local humanoid = character:FindFirstChildOfClass("Humanoid") or character:WaitForChild("Humanoid")
deep basin
#

mhm

#

oh nvm

midnight perch
#

add this

#

underneath ui destroy

deep basin
#

nope

#

still no

#

here's what I tried before your suggestion

midnight perch
#

show me your output after you click play

deep basin
#

playbutt.MouseButton1Click:Connect(function()
print("Play button clicked!")

UI:Destroy()

cam.CameraType = Enum.CameraType.Custom

if not fallen.Character or not fallen.Character:FindFirstChild("Humanoid") then
    fallen.CharacterAdded:Wait()
end

cam.CameraSubject = fallen.Character:FindFirstChild("Humanoid")

end)

deep basin
#

nothing was wrong

#

15:17:12.336 something is not a valid member of Workspace "Workspace" - Server
15:17:12.336 Stack Begin - Studio
15:17:12.337 Script 'cloud_103959015867444.ScreenGui.TextLabel.Script', Line 1 - Studio
15:17:12.337 Stack End - Studio
15:17:12.560 something is not a valid member of Workspace "Workspace" - Client
15:17:12.560 Stack Begin - Studio
15:17:12.560 Script 'cloud_103959015867444.ScreenGui.TextLabel.Script', Line 1 - Studio
15:17:12.560 Stack End - Studio
15:17:14.900 Play button clicked! - Client - LocalScript:29

#

ignore the "something is not a valid member of Workspace "Workspace" statement

#

my roblox has been glitching with this on every damn experience

#

and idk why

#

and this "Script 'cloud_103959015867444.ScreenGui.TextLabel.Script" as well

midnight perch
#

yeah im not really sure to be honest

#

my bad

deep basin
#

np

#

should I debug it with an AI?

midnight perch
#

playbutt.MouseButton1Click:Connect(function()
print("Play button clicked!")
UI:Destroy()

local function attachCamera()
    local char = fallen.Character or fallen.CharacterAdded:Wait()
    local hum = char:FindFirstChildOfClass("Humanoid") or char:WaitForChild("Humanoid")
    cam.CameraType = Enum.CameraType.Custom
    cam.CameraSubject = hum
end

attachCamera()

end)

#

final thing i can think of

deep basin
#

didn't work 😭

#

anyways

#

talked with gpt. after few corrections we got this

midnight perch
deep basin
#

it's working

#

yep

#

tried respawning

#

no problem

midnight perch
#

awesome