Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago
Edited 6 years ago

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)
0
You're not using RemoteEvents correctly. I'd suggest doing a little more research... Pojoto 329 — 6y
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 MaxDev_BE 55 — 6y
0
https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events Do a little more research one remove Event/Remote Functions GGButNO_RE 61 — 6y
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 MaxDev_BE 55 — 6y
View all comments (2 more)
0
You should move the "target" variable inside the Button1Down event User#19524 175 — 6y
0
I will try thanks u are better then the persons above u! MaxDev_BE 55 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

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

0
Can u accept me? MaxDev_BE is my name! MaxDev_BE 55 — 6y
Ad

Answer this question