I tried making a script that gives you energy powers when you get energy, but it doesn't work. here's the code:

game.Players.PlayerAdded:Connect(function(plr)
	local power = plr:WaitForChild("power")
	print(power.Value)
	if power.Value == "energy" then
		plr.CharacterAdded:Connect(function(char)
			for i,v in pairs(script:GetChildren()) do
				local clone = v:Clone()
				clone.Parent = char
			end
		end)
	end
end)  

I dont know why but i cant get the power and it doesn't even give errors.

1 comment

0

nvm i solved it lol