localPlayer = game.Players.LocalPlayer;
localGui = localPlayer:WaitForChild("PlayerGui");
localMouse = localPlayer:GetMouse();
serverVarCollections = game.ReplicatedStorage:WaitForChild("ServerVarCollections");
serverWeaponConfig = serverVarCollections:WaitForChild("WeaponConfig");
mouseIconId = serverWeaponConfig:WaitForChild("MouseIconId").Value;
panel = localGui:WaitForChild("Canvas"):WaitForChild("Menu"):WaitForChild("Panel");
playButton = panel:WaitForChild("Side"):WaitForChild("PlayButton");
customizeButton = panel:WaitForChild("Side"):WaitForChild("CustomizeButton");
starterGui = game.StarterGui;
playButton.MouseButton1Click:connect(function() print("Clicked")
localPlayer.CameraMode = "LockFirstPerson";
localMouse.Icon = "h#################################. (mouseIconId - 1);
panel:TweenPosition(UDim2.new(0, 0, -1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad);
wait(1);
starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true);
starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false);
end)
--Yup. That's the script. It's supposed to do all that stuff ##### ########## is clicked, but doesn't. It doesn't even print "Clicked". It's a LocalScript inside of the GUI. Please help. |