So basically i decided to make a script that will spawn about 500 parts, then crash them into the ground and explode. So when i tested it in the studio simulations it worked, but when i try to run this script on a server it does not work. Nothing pops up in Output so im so confsed on why it wont work. I have 2 parts contacting via Remote Events
Local Script inside of players backpack
local player = game.Players.LocalPlayer
name = player.Name
uis = game:GetService("UserInputService")
deb = false
uis.InputBegan:connect(function(key,proc)
if not proc then
if key.KeyCode == Enum.KeyCode.G and deb == false then
game.Workspace.RainRun:FireServer()
deb = true
script.Sound:Play()
local light = game:GetService("Lighting")
light.TimeOfDay = 0
light.Brightness = 0
local model = Instance.new("Model",game.Workspace)
model.Name = "Storage"
for i = 1,500 do
local part = game.Workspace.Get:Clone()
part.Anchored = false
part.Velocity = Vector3.new(10,50*10,10)
part.CFrame = player.Character.Head.CFrame * CFrame.new(0,1,0)
part.Bind:FireServer(name)
part.Parent = game.Workspace.Storage
wait()
end
local point = Instance.new("PointLight",player.Character.Torso)
point.Brightness = 25
player.Character.Humanoid.WalkSpeed = 50
local f = script.Fist:Clone()
f.Parent = player.Character["Right Arm"]
script.Parent.Parent.Fight.Disabled = false
wait(5)
wait(20)
local ctor = game.Workspace.Storage
ctor:Destroy()
wait(15)
deb = false
end
end
end)
Thats a script inside of the payer that is fired whenever they hit the Letter G on the keyboard
**Script inside of the part **
script.Parent.Bind.OnServerEvent:connect(function(player,name)
print("got")
script.Parent.Touched:connect(function(hit)
wait(15)
if hit.Parent:FindFirstChild("Humanoid") then
if hit.Parent.Name ~= name then
hit.Parent.Humanoid:TakeDamage(math.random(1,15))
end
end
local ex = Instance.new("Explosion")
ex.Position = script.Parent.Position
ex.Parent = script.Parent
print("Explosion Made")
end)
end)
Please help me bcuz im srsly confused

1 comment
who down voted me :/