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

Problem with my MouseButton1Down code?

Asked by
R_alatch 394 Moderation Voter
9 years ago

I get a error when trying to use this code I made, and i'm not sure why. Help?

Error: Players.Player.PlayerGui.ScreenGui.TextButton.LocalScript:4: unexpected symbol near ','

script.Parent.MouseButton1Down:connect(function(clicker)
    repeat
        clicker.Character.Head.Mesh.Scale = clicker.Character.Head.Mesh.Scale + 0.25, 0.25, 0.25
    until clicker.Character.Head.Mesh.Scale == 4, 4, 4
end)
0
use vector3.new for the 0,0,0 HungryJaffer 1246 — 9y

2 answers

Log in to vote
0
Answered by
neoG457 315 Moderation Voter
9 years ago
script.Parent.MouseButton1Down:connect(function(clicker)
    repeat
        clicker.Character.Head.Mesh.Scale = clicker.Character.Head.Mesh.Scale + Vector3.new(0.25, 0.25, 0.25)
    until clicker.Character.Head.Mesh.Scale == Vector3.new(4, 4, 4)
end)

This should work.

0
Players.Player.PlayerGui.ScreenGui.TextButton.LocalScript:3: attempt to index local 'clicker' (a number value) R_alatch 394 — 9y
0
Please explain your answers. And this would not work. Discern 1007 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

This might work.

function clicker()
    repeat
        clicker.Character.Head.Mesh.Scale = clicker.Character.Head.Mesh.Scale + Vector3.new(0.25,0.25,0.25)
    until clicker.Character.Head.Mesh.Scale==Vector3.new(4,4,4)
end

script.Parent.MouseButton1Down:connect(clicker)

Hope this helped!

Answer this question