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

Why it doens't make the gui visible? No errors?

So i want if it's a player you get the gui else not? I did this but it isn't working?

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local target = mouse.Target
local open = false

mouse.Button1Down:Connect(function()
	if target and game.Players:FindFirstChild(target.Parent.Name) then
		if open == false then
			script.Parent.Main.Visible = true
			script.Parent.FillTarget:FireServer(target)
	elseif open == true and not target then
			script.Parent.Main.Visible = false
			open = false
		elseif target and open == true then
			script.Parent.FillTarget:FireServer(target)
		end
	end
end)

6 comments

0

You're not using RemoteEvents correctly. I'd suggest doing a little more research...

0

What i am doing bad the remoteEvents are good you don’t know what they need to do and i am talking about the GUI not about that

0

https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events Do a little more research one remove Event/Remote Functions

0

But what i do bad at remote events? That somehting else that don’t need to make the gui visible omg ... i only want that the gui comes not about any remote event

0

You should move the "target" variable inside the Button1Down event

0

I will try thanks u are better then the persons above u!

1 answer

✓ Accepted answer

You're not getting any errors.

Your Target variable is set before you click. Set it when the player clicks instead of before.

I don't quite understand what you're trying to do here. Please contact me over Discord.

Bark#4260

1 comment

0

Can u accept me? MaxDev_BE is my name!

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