I don’t know if you really need to read the whole thing, but here
--power up spawning remote event
game.ReplicatedStorage.spawnPowerUp.OnServerEvent:Connect(function(plr, powerUpName, position)
print("fired")
local powerUpTemplate = game.ServerStorage.powerUpTemplate:Clone()
--loop through all powerups, seeing if it matches "powerUpName"
local powerUps = game.ReplicatedStorage.powerUps:GetDescendants() --get all powerups
local chosenPowerUp
for i, powerUp in pairs(powerUps) do
if powerUp.Name == powerUpName then
chosenPowerUp = powerUp
break
end
end
--if no power ups match the given name, then give a message in the output
if chosenPowerUp == nil then
print("Power up " ..powerUpName .." not found!")
else
--otherwise, if a powerup was found, start customizing the powerUpTemplate
powerUpTemplate.Name = chosenPowerUp.Name
powerUpTemplate.tokenTemplate.rightSide.image1.Texture = "rbxassetid://" ..chosenPowerUp.Value
powerUpTemplate.tokenTemplate.leftSide.image2.Texture = "rbxassetid://" ..chosenPowerUp.Value
local rarity = chosenPowerUp.Parent.Name
powerUpTemplate.tokenTemplate.BrickColor = rarityColors[rarity]
--if a position was given, position it there
if position ~= nil then
powerUpTemplate:PivotTo(CFrame.new(powerUpTemplate.Hitbox.Position + position))
end
--NOTE: if a position was not specified, meaning it DOES equal nil, it will simply be positioned at the origin
powerUpTemplate.Parent = workspace.powerUpSpawnFolder
end
end)
I’m throwing the following into the command bar
game.ReplicatedStorage.spawnPowerUp:FireServer(“Persona”)
No errors, no nothing
That first print statement at the top? It isn’t running, meaning the remote event isn’t being trigger at all
Why?