frame location - Starter Gui - Messages - Locked <-- The name of the frame
Value = script.Value function onTouched(part) if Value.Value == false then -- How to make the frame visible here else part.CFrame = CFrame.new(script.Parent.Parent.Parent.BlueR1.Position.x, script.Parent.Parent.Parent.BlueR1.Position.y + 5, script.Parent.Parent.Parent.BlueR1.Position.z) end end script.Parent.Touched:connect(onTouched)
I have tried so many different ways, for at least an hour but for some reason I can't figure it out? Am I just that dumb?
First, find the frame
What about this rock?
Your frame is not in StarterGui. I know, you totally think it is, because that's where you put it. But I want to make it very clear to you. Repeat after me: "I will not touch StarterGui"
Good boy.
You may now locate the Frame. The Frame is in fact in Player.PlayerGui
. What is Player
I hear you say? Player
is the Player who touched the part in question. Make sure you know how to get your Player before continuing, because it's very very important and you have no excuse for not knowing. Now that you have your PlayerGui, you'll be able to find it the same way as you'd be able to locate it from StarterGui (StarterGui.ScreenGui.Frame
-> PlayerGui.ScreenGui.Frame
)
Make it visible
It is known.
Making the Frame visible at this point is simple. Just set Frame.Visible
to true
. Wasn't that easy?