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

MouseButton1Click is not working. Please help. I do not know what the problem is. Anyone?

Asked by 4 years ago

I am trying to make an equip system. Specifacally, for pets. The MouseButton1Click event is not working. Please help.

This is the script

01local function createFrame(name, equippedValue)
02    local clone = temp:Clone()
03    clone.Name = name
04    if game.ReplicatedStorage.Pets:FindFirstChild(name) then
05        local VPFObj = game.ReplicatedStorage.Pets[name]:Clone()
06        VPFObj.Parent = clone
07 
08        local fakeCam = Instance.new("Camera")
09        fakeCam.Name = "FakeCam"
10        fakeCam.CFrame = CFrame.new(VPFObj.PrimaryPart.Position + (VPFObj.PrimaryPart.CFrame.lookVector * 5), VPFObj.PrimaryPart.Position)
11 
12        clone.CurrentCamera = fakeCam
13 
14        clone.PetName.Text = name
15 
View all 96 lines...

There are no errors. Nothing.

0
Try using ChildAdded to detect when people click the newframes laurenbtd5 379 — 4y
0
Thank you. I will try doing that and see if it works. Else, I will come back here and get back to you. Thank you! messi55313 -2 — 4y

Answer this question