first, i typed a gui hider script from youtube (where it hides the script on spawn), here's the script:

local frame = script.Parent.Parent.Frame
local open = false

script.Parent.MouseButton1Click:Connect(function()
	if frame.Visible == false then
		frame.Visible = false
	else
		frame.Visible = false
	end
end)

after typing this, it's still not working. i don't really specialize in lua, but im just asking it here. i kinda dont get why all the frame visible thing is always false

second, i copied a script where the gui when clicked would send the player back to respawn (part name), it's not working. i checked the console to see: moveTo is not a valid member of Accessory

here's the script:

character = game.Players.LocalPlayer.Character
script.Parent.MouseButton1Click:Connect(function()
	character.HumanoidRootPart.CFrame.new(workspace.Respawn.Position)
end)

thanks if you're gonna help

4 comments

1

For the first question, why don't you just hide the GUI manually by turning the Visible in the properties of the GUI?

0

wait that exists? lmao oof me I forgot that was there; but how would you make it show when the player touches an object?

0

What do you need help with? Making it not visible or getting it to show up when the player touches a brick?

0

Making it visible when the player touches the brick, making it hide was solved