of     1   

OnlineOne
#215930589Thursday, May 04, 2017 9:07 PM GMT

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.
Mouse_Potatoe
#215930709Thursday, May 04, 2017 9:09 PM GMT

The error is in tags. Wheres my money? i want free speech on roblox
Egtix
#215930854Thursday, May 04, 2017 9:12 PM GMT

localMouse.Icon = "rbxassetid://81052701" also you don't need to add ;
OnlineOne
#215931589Thursday, May 04, 2017 9:24 PM GMT

Vex. I use the semicolon to be neat, it's obvious I don't need it. Also, I know how to change the mouse's icon... I didn't just spam #'s for no reason. That was Roblox sensoring my code. ALSO, I said there were no errors and that thr function wasn't called to begin with, so that didn't help the problem.
OnlineOne
#215931746Thursday, May 04, 2017 9:26 PM GMT

Mouse, the error is not in the tags... that line works find and the function never calls in the first place. Please don't respond unless you know what you're doing.
OnlineOne
#215932100Thursday, May 04, 2017 9:32 PM GMT

The script starts disabled then becomes enabled. Is the function looking for button before it's declared, or is there some other gui property that I'm not noticing that's breaking the script?
ActiveWizard
#215934047Thursday, May 04, 2017 10:06 PM GMT

put a space between local and the variable name
OnlineOne
#215941344Friday, May 05, 2017 12:02 AM GMT

local is part of the variable name.. also why would I make a variable defined outside any functions local?
graveyardposse
#215942611Friday, May 05, 2017 12:26 AM GMT

can you move that print into a line of its own? it's really bothering my OCD
rockandrol120
#215944516Friday, May 05, 2017 12:58 AM GMT

A: You don't need to have so many waits, only wait for the MainGUI it's self, it is instant when it parents to PlayerGUI. (You might want to check if it even finds the GUI.) B: Make sure this is in a local environment, if it's not move it in the GUI or in PlayerGUI.
Ristone3
#215945485Friday, May 05, 2017 1:14 AM GMT

Add some prints between your variables at the top to see where it's getting stuck at. It's likely waiting infinitely for something, even a misspelling can cause the script to wait forever. Your output might be giving some warning texts about Infinite wait possible. Your clicked event will not be able to fire until everything above it is complete. Also, consider changing some of those variables to local variables. They are much faster to access, and are more memory efficient. Making a variable into a local variable is easy. For instance playButton would become: local playButton They work almost exactly the same, except that locals are much more quick to access, as stated above.

    of     1