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

Can someone walk me through how I can make a frame visible?

So I’m trying to learn scripting and I am using

script.Parent.ClickDetector.MouseHoverEnter:Connect(function()

but I dont know what to put under it? Can someone walk me through how I can do that? How do I make a frame visible when I hover my mouse over it? Can someone help?

1 comment

0

Are you using a ScreenGui or SurfaceGui?

1 answer

Remote Events. Since you're using a Server Script for the click detector, You need to turn on the frame using a local script. Put a remote event under ReplicatedStorage.

Server Script

script.Parent.ClickDetector.MouseHoverEnter:Connect(function(click)
	local plr = game.Players:GetPlayerFromCharacter(click.Parent)
	game.ReplicatedStorage.RemoteEvent:FireClient(plr)
end)

Local Script

game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function()
	local plrGui = game.Players.LocalPlayer.PlayerGui
	plrGui.Frame.Visible = true
end)

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