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

Script in gui opening other players' guis?

Asked by 3 years ago

I have this local script that when an Image Button is clicked, it opens a gui called "Frame". The frame is used for editing inventory stuff, which raises an immediate problem, trolling. I have no idea why the gui is opening another gui rather than itself.

The bug only happens when multiple people are in the server, and to the second player to open the inventory. If that player tries to use the gui, the script spits out a wad of errors and doesn't do anything. Any help?

This is what I think the bugged part of the script is

01script.Parent.MouseButton1Click:Connect(function(clk)
02    print("Clicked")
03    local Plr = game.Players.LocalPlayer
04    local Box1 = workspace.InvetoryBoxes.Invetory1
05    local Box2 = workspace.InvetoryBoxes.Invetory2
06    local Box3 = workspace.InvetoryBoxes.Invetory3
07    local Box4 = workspace.InvetoryBoxes.Invetory4
08    local Box5 = workspace.InvetoryBoxes.Invetory5
09    workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
10    ----------------Check which boxes are occupied-----------------
11    wait(0.01) ---security check---
12    if workspace.InvetoryBoxes.Invetory1.InvetoryBox1.Occupied.Value == false then
13        print("1 is free!")
14        workspace.CurrentCamera.CFrame = CFrame.new(Box1.Camera1.Position)
15        print("Camera is Ready!")
View all 22 lines...

Any help?

1
Can't really do much without more info. I've encounter problems similar to this (items being give to everyone instead of just the local player). If you could put in info as to where your local/normal script are located that'd be great. Also if you could put in the errors it gives you that would be useful as well. DocGooseYT 110 — 3y
0
The local script is located in an imagebutton in a screengui in the startergui. The errors are just parentage issues due to the bug TheB4dComputer 100 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

QUESTION SOLVED ITSELF!!!! I have no idea why it started working, but it did. Bonus points to all those who checked the question out!

Ad

Answer this question