How would I be able to increase the part size by 5 studs in each direction (except y axis), from the origin?
This is what I have currently
button in StarterGui to fire event
script that is supposed to increase size
This script that is supposed to increase size I think?
Can someone help with this?!
I’m not 100% sure if I’m using :Resize correctly. I saw it on another post.
--// variables
local IncreaseBaseplate = game.ReplicatedStorage:WaitForChild("IncreaseBaseplate")
local baseplate = game.Workspace:WaitForChild("Baseplate")
--// main
local function IncreaseSize()
baseplate:Resize(Enum.NormalId, 5)
end
IncreaseBaseplate.OnServerEvent:Connect(IncreaseSize())
I want to make it tween, so I used what you said and put this together.
No errors or anything but it doesnt seem to be working?
Any ideas?
--// variables
local IncreaseBaseplate = game.ReplicatedStorage:WaitForChild("IncreaseBaseplate")
local baseplate = game.Workspace:WaitForChild("Baseplate")
--// main
local Info = TweenInfo.new(
5,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out,
0,
false,
0
)
local Goals = {Size=Vector3.new(baseplate.Size.X + 5, baseplate.size.Y, baseplate.Size.Z + 5)}-- the size to tween to
local tween = game:GetService("TweenService"):Create(baseplate,Info,Goals)
tween:Play()
IncreaseBaseplate.OnServerEvent:Connect(function()
tween:Play()
end)
perhaps its not playing when you fire a remote because you already play the tween right after creating it. If you want to be able to play it as many times as you want, create the tween inside of the onServerEvent function.
This was correct, but now because of that it only plays once, I want it to be able to change every time it is pressed instead of just once, would that be possible?
Yes, as I said just put the logic to create the tween inside of the onServerEvent function. A new tween should be created and played every time they click the button.