the error code
19:36:11.905 Infinite yield possible on 'ReplicatedStorage:WaitForChild("Summon")' - Studio 19:36:11.905 Stack Begin - Studio 19:36:11.905 Script 'ServerScriptService.Summon', Line 2 - Studio - Summon:2 19:36:11.905 Stack End - Studio 19:36:16.955 Infinite yield possible on 'ReplicatedStorage:WaitForChild("Summon")' - Studio 19:36:16.955 Stack Begin - Studio 19:36:16.956 Script 'Players.Aesurite.Backpack.Summon', Line 4 - Studio - Summon:4 19:36:16.956 Stack End - Studio
keeps appearing and it wont stop appearing. my scripts are:
for summon script local rp = game:GetService("ReplicatedStorage") local summon = rp:WaitForChild("Summon")
local TweenService = game:GetService("TweenService") local Debris = game:GetService("Debris")
summon.OnServerEvent:Connect(function(Player,isActive) local Character = Player.Character local Humanoid = Character.Humanoid local Humrp = Character.HumanoidRootPart
if isActive then
local Stand = script:WaitForChild("Stand"):Clone()
for _, part in pairs(Stand:GetChildren()) do
if part:IsA("BasePart") then
part.Transperency = 1
end
end
Stand.Parent = Character
Stand.PrimaryPart.CFrame = Humrp.CFrame
local weld = Instance.new("ManualWeld")
weld.Name = "Controller"
weld.Part0 = Stand.PrimaryPart
weld.Part1 = Humrp
weld.c0 = weld.Part0.CFrame:ToolObjectSpace(weld.Part1.CFrame)
weld.Parent = weld.Part0
local AnimControl = Stand:FindFirstChild("AnimControl")
local standHumrp = Stand:FindFirstChild("HumanoidRootPart")
local Idle = AnimControl:LoadAnimation(script.Idle)
Idle:Play()
for _, part in pairs(Stand:GetChildren()) do
if part:IsA("BasePart") and part ~= standHumrp then
local goal = {}
goal.Transperency = 0
local info = TweenInfo.new(.5)
local tween = TweenService:Create(part,info,goal)
tween:Play()
end
end
local goal = {}
goal.C0 = weld.Part0.CFrame:ToolObjectSpace(weld.Part1.CFrame)
goal.C1 = weld.Part0.CFrame:ToolObjectSpace(weld.Part1.CFrame * CFrame.new(-3,1,2))
local info = TweenInfo.new(.5)
local tween = TweenInfo:Create(weld,info,goal)
tween:Play()
else
local Stand = Character:FindFirstChild("Stand")
if Stand then
local Controller = Stand.PrimaryPart:FindFirstChild("Controller")
if Controller then
local standHumrp = Stand:FindFirstChild("HumanoidRootPart")
for _, part in pairs(Stand:GetChildren()) do
if part:IsA("BasePart") and part ~= standHumrp then
local goal = {}
goal.Transperency = 1
local info = TweenInfo.new(.5)
local tween = TweenService:Create(part,info,goal)
tween:Play()
end
end
local goal = {}
goal.C0 = Controller.Part0.CFrame:ToolObjectSpace(Controller.Part1.CFrame)
goal.C1 = Controller.Part0.CFrame:ToolObjectSpace(Controller.Part1.CFrame * CFrame.new(0,0,0))
local info = TweenInfo.new(.5)
local tween = TweenInfo:Create(Controller,info,goal)
tween:Play()
tween.Completed:Connect(function()
Debris:AddItem(Stand,.05)
end)
end
end
end
end)
and for the local:
local Player = game:GetService("Players").LocalPlayer
local rp = game:GetService("ReplicatedStorage") local summon = rp:WaitForChild("Summon")
local UIS = game:GetService("UserInputService")
local isActive = false local debounce = false local cd = 1
UIS.InputBegan:Connect(function(input,isTyping) if isTyping then return elseif input.KeyCode == Enum.KeyCode.Q then if debounce == false and isActive == false then isActive = true debounce = true
summon.FireServer(isActive)
wait(cd)
debounce = false
elseif debounce == false and isActive == true then
isActive = false
debounce = true
summon:FireServer(isActive)
wait(cd)
debounce = false
end
end
end)

1 comment
ok, can you tell me where to put it in my script?