Thankyou in Advance
local input = game:GetService("UserInputService") local player = game.Players.LocalPlayer local tweenService = game:GetService("TweenService") local animations = {2469483212} local ready = true local function Hulk(inputObject) if inputObject.KeyCode == Enum.KeyCode.LeftAlt and ready then local char = player.Character or player.CharacterAdded:Wait() local hum = char.Humanoid local animation = Instance.new("Animation") local picked = 1 local tween = TweenInfo.new(1.25,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0) local a = hum.BodyDepthScale.Value local b = hum.BodyWidthScale.Value local c = hum.BodyHeightScale.Value local d = hum.HeadScale.Value local change = {a = 2,b = 2,c = 2,d = 3} local twin = tweenService:Create(hum,tween,change) twin:Play() animation.AnimationId = "http://roblox.com/asset/?id="..animations[picked] local AnimaTrack = hum:LoadAnimation(animation) AnimaTrack:Play() wait(1.25) ready = false end end input.InputBegan:connect(Hulk)
**Error:* TweenService:Create no property named 'b' for object 'Humanoid'***
The Create
method of TweenService
takes in three parameters: the instance with which to tween the properties, tween information, and a dictionary containing the properties to change. You have done all the mentioned parameters correctly except for the dictionary. The keys of your dictionary should be the exact name of the property and the value should be the what you want to tween the property to.
--A general example do local instance = ... local info = TweenInfo.new(...) local change = { PropertyName1 = value1; PropertyName2 = value2; PropertyName3 = value3; propertyName4 = value4; } local tween = TweenService:Create(instance , info , change) tween:Play() end --A practical example --Tweens the "Transparency" property of a part in the workspace do local part = workspace.Part local info = TweenInfo.new(1) local change = { Transparency = 1 } local tween = TweenService:Create(part , info , change) tween:Play() end