hello,
I want to make a script where I tween the size of an object to be bigger. The script works when I press a button on my keyboard but every time it is pressed it says " Unable to cast to Dictionary "
Can anyone explain to me what is it and how to fix it because i am planning to use more tweens.
local TweenService = game:GetService("TweenService")
local Roomenabled = true
script.Fire.OnServerEvent:Connect(function(player, ability)
if ability == "Room" then
if not Roomenabled then return end
local ROOM = Instance.new("Part")
ROOM.Position = player.Character.HumanoidRootPart.Position
ROOM.CanCollide = false
ROOM.Anchored = true
ROOM.Parent = game.Workspace
ROOM.Transparency = 0.5
ROOM.Shape = Enum.PartType.Ball
ROOM.Color = Color3.new(0.266667, 0.466667, 0.827451)
ROOM.Material = Enum.Material.SmoothPlastic
local EndSize = Vector3.new(115,115,115)
local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out, 0, true, 5)
local tween = TweenService:Create(ROOM, tweenInfo, EndSize)
tween:Play()
end
end)
Thanks for your time.