Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why doesn't :Resize() go anything under 0.5?

So I'm just messing around with :Resize(), but it won't resize it anything under 0.5

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Button1Down:Connect(function()
	if mouse.Target then
		if mouse.Target.Name == "Dirt" then
			mouse.Target:Resize(1,-0.5)
		end
	end
end)

so if I change it to -0.4, it won't change. Why is this?

1 answer

✓ Accepted answer

###This is because the Resize method takes two arguments.

##1. NormalId normalId, ##2. int deltaAmount

###You didn't provide the first argument, and didn't give an integer to the second argument.

local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local uis = game:GetService("UserInputService")

uis.InputBegan:Connect(function(i, c)
    local trgt = mouse.Target

    if i.UserInputType == Enum.UserInputType.MouseButton1 and trgt then
        if trgt.Name == "Dirt" then
            trgt:Resize(Enum.NormalId.Top, 1) -- should work
        end
    end
end)

2 comments

0

Um, yes I did

This discussion is preserved as it was. New answers, comments, and votes are closed.