Hi everyone I’m currently working on an Ability Tool System and I only need 4 more abilities so rn I want that when a Tool is activated a part should appear and disappear for few seconds now I asked Chat GPT(IK he’s not good) and I got a Script from him so the reason why I got the Script from Chat GPT is because I want to let u know what I mean I have this LocalScript in the Tool and I also got a Part called “PlatformTemplate” in the Replicated Storage
local tool = script.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local replicatedStorage = game:GetService("ReplicatedStorage")
local platformTemplate = replicatedStorage:WaitForChild("PlatformTemplate")
local function createPlatform()
local character = player.Character or player.CharacterAdded:Wait()
local platform = platformTemplate:Clone()
platform.Position = character.HumanoidRootPart.Position + Vector3.new(0, 5, 0) -- Adjust height as needed
platform.Parent = workspace
-- Platform disappears after a few seconds
wait(5) -- Change duration as needed
platform:Destroy()
end
tool.Activated:Connect(createPlatform)