-
What do you want to achieve? I want to make so when the tool is activated it creates a part near the character
-
What is the issue? The animation is playing but it is not printing and not creating a part
-
What solutions have you tried so far? I tried many editions of the script but it didn’t help
Local script
local tool = script.Parent
local Handle = script.Parent.Handle
local remote = game.StarterPack.Ember.RemoteEvent
tool.Activated:Connect(function()
local tool = script.Parent
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=6307341520"
local track
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track:Play()
wait(1)
track:Stop()
tool:Destroy()
remote:FireServer(tool)
end)
script
local tool = script.Parent
local handle = script.Parent.Handle
script.Parent.RemoteEvent.OnServerEvent:Connect(function(player, tool)
local char = player.Character
pairs("Works")
local HRP = char.HumanoidRootPart
local part = Instance.new("Part",game.Workspace)
part.Anchored = true
part.CanCollide = false
part.Shape = Enum.PartType.Ball
part.Color = Color3.fromRGB(97, 134, 255)
part.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,10,0)
end)
I don’t have any errors in the output
robloxapp-20210131-1736596.wmv (872.6 KB)