hi ive tried everything i know and it didnt work it only spawn on the origin which it 0,0,0 and i dont know how to do pls help me
here is my script:
local Players = game.Players.LocalPlayer
local mouse = Players:GetMouse()
local UIS = game:GetService(“UserInputService”)
local TwSer = game:GetService(“TweenService”)
local spherepos = mouse.Hit.p
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.F then
local Sphere = Instance.new("Part")
Sphere.Name = "ROOM"
Sphere.Transparency = 0.85
Sphere.BrickColor = BrickColor.new("Electric blue")
Sphere.Shape = Enum.PartType.Ball
Sphere.Material = Enum.Material.Neon
Sphere.Parent = game.Workspace
Sphere.Anchored = true
Sphere.CanCollide = false
Sphere.Position = Vector3.new(spherepos)
local TwInfo = TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0)
local SphereInfo = {
Size = Vector3.new(200,200,200);
}
local Room = TwSer:Create(Sphere,TwInfo,SphereInfo)
Room:Play()
wait(10)
local TwInfo1 = TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0)
local SphereInfo1 = {
Size = Vector3.new(1,1,1);
}
local Room1 = TwSer:Create(Sphere,TwInfo1,SphereInfo1)
Room1:Play()
wait(2)
game.Workspace.ROOM:Destroy()
end
end)
thx in advance =)