So 'dong' is a part, and I'm trying to have the player increase the Y size of it by stepping on another part which is 'increase size button'. When I go into play mode and step on increase size button, studio instantly freezes and crashes eventually. For the output it just says 'Y cannot be assigned to'...
Code: https://gyazo.com/a2c1fdd5020d5f9f1f6b8dfef2c00e91 Output: https://gyazo.com/f23a94899e7f934fd226a8f40afeb436
There is A Much Better Way To Do This, Roblox Has These Services Called "Tween Service" And What They Do is, They Tween The Objects That You Want To Transform/Move Here I'll Write The Code And Make It Easier For You.. Note:Make sure this script is in "increase size button" or it wont work. Script:
local dong = game.Workspace.dong local tweenservice = game:GetService("TweenService")-- get the tweenservice first local info = TweenInfo.new( 4,-- the duration of "dong" Size Changing Enum.EasingStyle.Sine, --The Style You Want To Make dong Change in Enum.EasingDirection.Out,-- The Direction Which Should Be "Out" In Your case 0,--these arent really relevant to your Case false,-- 0--------------------------------------------------) ) local goals = {--now we're gonna tell the script How Big/Small We Want "dong" To Be Size = Vector3.new(dong.Size.X,20,dong.Size.Z)--you can replace the 20 with how high you want "dong" to be after The Tranformation! } local tween = tweenservice:Create(dong,info,goals)--now lets create the whole tween with everything we have written! script.Parent.Touched:Connect(function()-- now for the most important part!!! tween:Play() end)
If you Have Anymore Questions Then Im Happy T Answer :)