Problem: It kept on saying line 1 code has an error
Purpose of this script: Making Class Load outs GUI
Well I put this script in a Local script, I was making a class load out script like I copy in this video
Link:** https://www.youtube.com/watch?v=gG8H_dbnA8o**
Their was an error, I tried to fix it what ever I do it just makes/ making errors
Script:
script.Parent.MouseButton1Click:connect(function() local Fire = game.ReplicatedStorage.Weapons Fire:FireServer(script.Parent.Parent.Loadout.Value) script.Parent.Parent:TweenPosition(UDim2.New(2,0,.1,0),"Out","Quad", 1) end)
line 1 is my problem here guys. Also this script/Local script is in a Text Label.
Your issue on line 1 is that the function for detecting mouse clicking isn't called MouseButton1Click, it's called MouseButton1Down so all you would have to do is:
script.Parent.MouseButton1Down:Connect(function() -- Put the code here for the function end)